summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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