I'm trying to use the getbug() method of python-bugzilla to get more
details (extract additional fields) from specific bugs; however, I am
apparently missing something.
>> import bugzilla
>> bz.login(user,password)
>> bz.getbug('111111')
<Bug #111111 on
https://bugzilla.redhat.com/xmlrpc.cgi at 0x175fd90>
>> print bz.getbug('111111')
#111111 CLOSED -
hp(a)redhat.com - libgnomeui should BuildRequires:
libjpeg-devel
>> print bz.getbug('111111',
include_fields=['cf_qa_whiteboard']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 983, in
getbug
exclude_fields=exclude_fields, extra_fields=extra_fields)
File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 976, in
_getbug
extra_fields=extra_fields)[0]
File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 951, in
_getbugs
bugdict = dict([(b['id'], b) for b in r['bugs']])
KeyError: 'id'
>> print
bz.getbug('111111',['cf_qa_whiteboard'])
Traceback (most recent call
last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 983, in
getbug
exclude_fields=exclude_fields, extra_fields=extra_fields)
File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 976, in
_getbug
extra_fields=extra_fields)[0]
File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 951, in
_getbugs
bugdict = dict([(b['id'], b) for b in r['bugs']])
KeyError: 'id'
Appreciate any insight here.
Thanks!
--
[image: Eric Sammons on about.me]
Eric Sammons
about.me/ericsammons
<
http://about.me/ericsammons>