summaryrefslogtreecommitdiffstats
path: root/bugzilla/base.py
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2008-09-04 17:12:56 -0400
committerWill Woods <wwoods@redhat.com>2008-09-04 17:12:56 -0400
commitc89c9705d6c2f886777a2c173e2e338e57923ca7 (patch)
tree72ca11f21cafd43b1709eab357772675e2e77b5b /bugzilla/base.py
parentd8332348457fed43ed4bb4cbde97e426a8b71ce3 (diff)
downloadpython-bugzilla-c89c9705d6c2f886777a2c173e2e338e57923ca7.tar.gz
python-bugzilla-c89c9705d6c2f886777a2c173e2e338e57923ca7.tar.xz
python-bugzilla-c89c9705d6c2f886777a2c173e2e338e57923ca7.zip
cookielib won't read empty files - let it write the empty cookiefile itself
Diffstat (limited to 'bugzilla/base.py')
-rw-r--r--bugzilla/base.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/bugzilla/base.py b/bugzilla/base.py
index 7e8f4f4..8014c45 100644
--- a/bugzilla/base.py
+++ b/bugzilla/base.py
@@ -105,10 +105,9 @@ class BugzillaBase(object):
if os.path.exists(self.cookiefile):
cj.load()
else:
- # Create an empty file that's only readable by this user
+ # Create an empty cookiefile that's only readable by this user
old_umask = os.umask(0077)
- f = open(self.cookiefile,"w")
- f.close()
+ cj.save(self.cookiefile)
os.umask(old_umask)
self._cookiejar = cj
self._cookiejar.filename = self.cookiefile