From a9031640bb23d32c0eeeada94aa4945def6bed90 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Tue, 18 Sep 2007 10:06:11 -0400 Subject: fix cookieglob, handle keyboard interrupt, default to beta site --- selftest.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/selftest.py b/selftest.py index e6341e1..30f212d 100755 --- a/selftest.py +++ b/selftest.py @@ -12,16 +12,17 @@ from bugzilla import Bugzilla import os, glob, sys +import xmlrpclib def find_firefox_cookiefile(): - cookieglob = os.path.expanduser('~/.mozilla/firefox/default.*/cookies.txt') + cookieglob = os.path.expanduser('~/.mozilla/firefox/*default*/cookies.txt') cookiefiles = glob.glob(cookieglob) if cookiefiles: # TODO return whichever is newest return cookiefiles[0] def selftest(user='',password=''): - url = 'https://bugzilla.redhat.com/xmlrpc.cgi' + url = 'https://partner-bugzilla.redhat.com/xmlrpc.cgi' public_bug = 1 private_bug = 250666 bugidlist = (1,2,3,1337,123456) @@ -87,4 +88,7 @@ if __name__ == '__main__': password = '' if len(sys.argv) > 2: (user,password) = sys.argv[1:3] - selftest(user,password) + try: + selftest(user,password) + except KeyboardInterrupt: + print "Exiting on keyboard interrupt." -- cgit