From 9034b278143ff8037bcc292738ae1ea7d8faf688 Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Mon, 10 Mar 2014 22:36:56 +0100 Subject: [PATCH] - fixed creation of ~/.osc_cookiejar A "PyCFunction_Type" like os.open takes no keyword arguments. --- osc/conf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osc/conf.py b/osc/conf.py index 2e99df6a..4c10e1fb 100644 --- a/osc/conf.py +++ b/osc/conf.py @@ -571,9 +571,10 @@ def init_basicauth(config): cookiejar.load(ignore_discard=True) except IOError: try: - fd = os.open(cookie_file, os.O_CREAT | os.O_WRONLY | os.O_TRUNC, mode=0o600) + fd = os.open(cookie_file, os.O_CREAT | os.O_WRONLY | os.O_TRUNC, 0o600) os.close(fd) - except: + except IOError: + # hmm is any good reason why we should catch the IOError? #print 'Unable to create cookiejar file: \'%s\'. Using RAM-based cookies.' % cookie_file cookiejar = CookieJar()