summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2008-08-25 13:51:16 -0400
committerWill Woods <wwoods@redhat.com>2008-08-25 13:51:16 -0400
commit876bda5792071952ec592d1d9b451a3bb9e2d94c (patch)
tree4c1ec5c77867c88c28ef8b50735a6b87ea5189a6
parentb96496b875f3561099b94f644792686b9ec95885 (diff)
downloadpython-bugzilla-876bda5792071952ec592d1d9b451a3bb9e2d94c.zip
python-bugzilla-876bda5792071952ec592d1d9b451a3bb9e2d94c.tar.gz
python-bugzilla-876bda5792071952ec592d1d9b451a3bb9e2d94c.tar.xz
More useful debugging info
-rw-r--r--bugzilla/__init__.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/bugzilla/__init__.py b/bugzilla/__init__.py
index ebc8bb4..dfda0c4 100644
--- a/bugzilla/__init__.py
+++ b/bugzilla/__init__.py
@@ -17,6 +17,7 @@ import logging
log = logging.getLogger("bugzilla")
def getBugzillaClassForURL(url):
+ log.debug("Choosing subclass for %s" % url)
s = xmlrpclib.ServerProxy(url)
rhbz = False
bzversion = ''
@@ -24,17 +25,21 @@ def getBugzillaClassForURL(url):
# Check for a RH-only method
try:
+ log.debug("Checking for RH Bugzilla method bugzilla.getProdInfo()")
prodinfo = s.bugzilla.getProdInfo()
rhbz = True
except xmlrpclib.Fault:
pass
+ log.debug("rhbz=%s" % str(rhbz))
# Try to get the bugzilla version string
try:
+ log.debug("Checking return value of Buzilla.version()")
r = s.Bugzilla.version()
bzversion = r['version']
except xmlrpclib.Fault:
pass
+ log.debug("bzversion='%s'" % str(bzversion))
# current preference order: RHBugzilla, Bugzilla3
# RH BZ 3.2 will have rhbz == True and bzversion == 3.1.x or 3.2.x.
@@ -56,13 +61,11 @@ class Bugzilla(object):
'''Magical Bugzilla class that figures out which Bugzilla implementation
to use and uses that.'''
def __init__(self,**kwargs):
- log.debug("Bugzilla v%s initializing" % base.version)
+ log.info("Bugzilla v%s initializing" % base.version)
if 'url' in kwargs:
- log.debug("Choosing implementation for %s" % kwargs['url'])
c = getBugzillaClassForURL(kwargs['url'])
if c:
self.__class__ = c
c.__init__(self,**kwargs)
- log.debug("Using Bugzilla subclass %s v%s" % \
- (c.__name__,c.version))
+ log.info("Chose subclass %s v%s" % (c.__name__,c.version))
# FIXME no url? raise an error or something here, jeez