From c89c9705d6c2f886777a2c173e2e338e57923ca7 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Thu, 4 Sep 2008 17:12:56 -0400 Subject: cookielib won't read empty files - let it write the empty cookiefile itself --- bugzilla/base.py | 5 ++--- 1 file 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 -- cgit