From a340f57f7e6b8d0d9ea3a9341a950fb73d3fde06 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Sat, 29 Aug 2009 11:37:06 -0400 Subject: 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 --- git-bz | 9 +++++---- 1 file 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 -- cgit v1.2.3