summaryrefslogtreecommitdiffstats
path: root/bugzilla/rhbugzilla.py
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2008-06-10 14:54:15 -0400
committerWill Woods <wwoods@redhat.com>2008-06-10 14:54:15 -0400
commit68299ba63acc14fc38f2dc2c7fd1373c0aff1119 (patch)
tree60004e19b4962c128dfe001fb91371bded023f87 /bugzilla/rhbugzilla.py
parent4782cbf51cdf89faa977ccace668f75e97e21e6d (diff)
downloadpython-bugzilla-68299ba63acc14fc38f2dc2c7fd1373c0aff1119.tar.gz
python-bugzilla-68299ba63acc14fc38f2dc2c7fd1373c0aff1119.tar.xz
python-bugzilla-68299ba63acc14fc38f2dc2c7fd1373c0aff1119.zip
Explicitly mark methods unsupported by bugzilla3.0. Change the format of the .product attribute to be more like Bugzilla 3.x.
Diffstat (limited to 'bugzilla/rhbugzilla.py')
-rw-r--r--bugzilla/rhbugzilla.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/bugzilla/rhbugzilla.py b/bugzilla/rhbugzilla.py
index c5964e2..a069a2b 100644
--- a/bugzilla/rhbugzilla.py
+++ b/bugzilla/rhbugzilla.py
@@ -33,10 +33,24 @@ class RHBugzilla(bugzilla.base.BugzillaBase):
def _getqueryinfo(self):
return self._proxy.bugzilla.getQueryInfo()
def _getproducts(self):
- return self._proxy.bugzilla.getProdInfo()
+ '''Backend _getproducts method for RH Bugzilla. This predates the
+ Bugzilla3 Products stuff, so we need to massage this data to make it
+ fit the proper format'''
+ r = self._proxy.bugzilla.getProdInfo()
+ n = 0
+ prod = []
+ for name,desc in r.iteritems():
+ # We're making up a fake id, since RHBugzilla doesn't use them
+ prod.append({'id':n,'name':name,'description':desc})
+ n += 1
+ return prod
def _getcomponents(self,product):
+ if type(product) == int:
+ product = self._product_id_to_name(product)
return self._proxy.bugzilla.getProdCompInfo(product)
def _getcomponentsdetails(self,product):
+ if type(product) == int:
+ product = self._product_id_to_name(product)
return self._proxy.bugzilla.getProdCompDetails(product)
#---- Methods for reading bugs and bug info