summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2009-08-29 11:37:06 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2009-08-29 11:37:06 -0400
commita340f57f7e6b8d0d9ea3a9341a950fb73d3fde06 (patch)
treec80f78d5d6459b526c9d713635720ab79d7d4f95
parent795ff39a29df7fdc5b854bd77534bc1939feebc7 (diff)
Fix error message when not logged in
A string with unsubstituted %s was being printed; substitute in the host and browser properly. Pointed out by Jonathon Jongsma
-rwxr-xr-xgit-bz9
1 files changed, 5 insertions, 4 deletions
diff --git a/git-bz b/git-bz
index e91cce3..bb949bc 100755
--- a/git-bz
+++ b/git-bz
@@ -528,18 +528,19 @@ def get_cookies_from_sqlite_with_copy(host, cookies_sqlite, browser, *args, **kw
finally:
os.remove(db_copy)
-def get_cookies_from_sqlite(*args, **kwargs):
+def get_cookies_from_sqlite(host, cookies_sqlite, browser, query):
try:
- result = do_get_cookies_from_sqlite(*args, **kwargs)
+ result = do_get_cookies_from_sqlite(host, cookies_sqlite, browser, query)
except sqlite.OperationalError, e:
if "database is locked" in str(e):
# Try making a temporary copy
- result = get_cookies_from_sqlite_with_copy(*args, **kwargs)
+ result = get_cookies_from_sqlite_with_copy(host, cookies_sqlite, browser, query)
else:
raise
if not ('Bugzilla_login' in result and 'Bugzilla_logincookie' in result):
- raise CookieError("You don't appear to be signed into %s; please log in with %s")
+ raise CookieError("You don't appear to be signed into %s; please log in with %s" % (host,
+ browser))
return result