diff options
author | Will Woods <wwoods@metroid.rdu.redhat.com> | 2007-08-30 18:33:33 -0400 |
---|---|---|
committer | Will Woods <wwoods@metroid.rdu.redhat.com> | 2007-08-30 18:33:33 -0400 |
commit | 94b0598a01563937c443d78a312b69cc2c054a7a (patch) | |
tree | acab5a73891a4fc47b5b463a647cecabda8f01ea /bugzilla.py | |
parent | 425c1f74ee4eece22eacae0b27927c62a9805a06 (diff) | |
download | python-bugzilla-94b0598a01563937c443d78a312b69cc2c054a7a.tar.gz python-bugzilla-94b0598a01563937c443d78a312b69cc2c054a7a.tar.xz python-bugzilla-94b0598a01563937c443d78a312b69cc2c054a7a.zip |
remove selftest code
Diffstat (limited to 'bugzilla.py')
-rw-r--r-- | bugzilla.py | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/bugzilla.py b/bugzilla.py index 77107bf..be368ca 100644 --- a/bugzilla.py +++ b/bugzilla.py @@ -166,34 +166,3 @@ class SafeCookieTransport(xmlrpclib.SafeTransport,CookieTransport): '''SafeTransport subclass that supports cookies.''' scheme = 'https' request = CookieTransport.request - -import os, glob - -def find_firefox_cookiefile(): - 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(): - url = 'https://bugzilla.redhat.com/xmlrpc.cgi' - cookies = find_firefox_cookiefile() - public_bug = 1 - private_bug = 250666 - print "Woo, welcome to the bugzilla.py self-test." - print "Using bugzilla at " + url - print "Reading cookies from " + cookies - b = Bugzilla(url=url,cookies=cookies) - print "Reading product list" - print b.products() - print "Reading public bug (#%i)" % public_bug - print b.getbug(public_bug) - print "Reading private bug (#%i)" % private_bug - try: - print b.getbug(private_bug) - except xmlrpclib.Fault, e: - if 'NotPermitted' in e.faultString: - print "Failed: Not authorized." - else: - print "Failed: Unknown XMLRPC error: %s" % e |