diff options
author | Will Woods <wwoods@wills-mini.localdomain> | 2007-09-04 14:41:19 -0400 |
---|---|---|
committer | Will Woods <wwoods@wills-mini.localdomain> | 2007-09-04 14:41:19 -0400 |
commit | bebde5fd746a4ba694e39535a4274adc0ae41d75 (patch) | |
tree | 03d38685e9a112267a516641b70f5e0413cda074 /selftest.py | |
parent | 26a942492c3a6f6b2ee1e80d9fd449f24baa71ca (diff) | |
download | python-bugzilla-bebde5fd746a4ba694e39535a4274adc0ae41d75.tar.gz python-bugzilla-bebde5fd746a4ba694e39535a4274adc0ae41d75.tar.xz python-bugzilla-bebde5fd746a4ba694e39535a4274adc0ae41d75.zip |
handle missing cookies
Diffstat (limited to 'selftest.py')
-rwxr-xr-x | selftest.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/selftest.py b/selftest.py index a7fbe57..11d89a5 100755 --- a/selftest.py +++ b/selftest.py @@ -2,7 +2,7 @@ # Simple self-test of the bugzilla module from bugzilla import Bugzilla -import os, glob +import os, glob, sys def find_firefox_cookiefile(): cookieglob = os.path.expanduser('~/.mozilla/firefox/default.*/cookies.txt') @@ -18,6 +18,10 @@ def selftest(): private_bug = 250666 print "Woo, welcome to the bugzilla.py self-test." print "Using bugzilla at " + url + if not cookies: + print "Could not find any cookies for that URL!" + print "Log in with firefox or give me a username/password." + sys.exit(1) print "Reading cookies from " + cookies b = Bugzilla(url=url,cookies=cookies) print "Reading product list" |