diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2009-08-29 11:37:06 -0400 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2009-08-29 11:37:06 -0400 |
commit | a340f57f7e6b8d0d9ea3a9341a950fb73d3fde06 (patch) | |
tree | c80f78d5d6459b526c9d713635720ab79d7d4f95 | |
parent | 795ff39a29df7fdc5b854bd77534bc1939feebc7 (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-x | git-bz | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 |