[python-bugzilla] getbug(id,include_fields=...)

Eric Sammons elsammons at gmail.com
Fri Aug 1 13:58:42 UTC 2014


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 = bugzilla.Bugzilla('https://bugzilla.redhat.com/xmlrpc.cgi')

>>> 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 at 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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/python-bugzilla/attachments/20140801/48fafda4/attachment.html>


More information about the python-bugzilla mailing list