diff options
author | keis <keijser@gmail.com> | 2010-12-17 23:40:59 +0100 |
---|---|---|
committer | keis <keijser@gmail.com> | 2010-12-18 00:32:25 +0100 |
commit | c294dc43176f384a7a7c2a3be25eebefb3698315 (patch) | |
tree | bdc6da17701143dfc7d17ab00dcef29ad1467bbc | |
parent | 29c15cf845d41ff4aa3cf2cb4d30a83c14485070 (diff) |
should open file with a+ when writing cookies
-rw-r--r-- | examples/data/plugins/cookies.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/data/plugins/cookies.py b/examples/data/plugins/cookies.py index 0264471..a4ae530 100644 --- a/examples/data/plugins/cookies.py +++ b/examples/data/plugins/cookies.py @@ -66,7 +66,7 @@ class TextStore(object): self.delete_cookie(None, cookie[:-3]) first = not os.path.exists(self.filename) - with open(self.filename, 'a') as f: + with open(self.filename, 'a+') as f: if first: print >> f, "# HTTP Cookie File" print >> f, '\t'.join(self.as_file(cookie)) |