summaryrefslogtreecommitdiffstats
path: root/selftest.py
diff options
context:
space:
mode:
authorWill Woods <wwoods@wills-mini.localdomain>2007-09-04 14:41:19 -0400
committerWill Woods <wwoods@wills-mini.localdomain>2007-09-04 14:41:19 -0400
commitbebde5fd746a4ba694e39535a4274adc0ae41d75 (patch)
tree03d38685e9a112267a516641b70f5e0413cda074 /selftest.py
parent26a942492c3a6f6b2ee1e80d9fd449f24baa71ca (diff)
downloadpython-bugzilla-bebde5fd746a4ba694e39535a4274adc0ae41d75.tar.gz
python-bugzilla-bebde5fd746a4ba694e39535a4274adc0ae41d75.tar.xz
python-bugzilla-bebde5fd746a4ba694e39535a4274adc0ae41d75.zip
handle missing cookies
Diffstat (limited to 'selftest.py')
-rwxr-xr-xselftest.py6
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"