[python-bugzilla] Can't set multicall=False

Cole Robinson crobinso at redhat.com
Tue Oct 16 22:27:45 UTC 2012


Firstly Jason, sorry for no one responding for 2 months.

On 08/16/2012 11:07 PM, Jason L Tibbitts III wrote:
> I'm doing some work with the Red Hat bugzilla and really need the
> performance increase of calling getbugs with a big list of bugs instead
> of letting it do the multicall.  So I figure I'd just pass
> multicall=False to the constructor, but it fails:
> 
> TypeError: __init__() got an unexpected keyword argument 'multicall'
> 
> I have limited understanding of python, but it seems that the kwargs get
> passed all the way down to BugzillaBase.__init__ which bails if it gets
> anything other than user, password, url or cookiefile.
> 

Thanks for the report. Indeed this has been busted for a while, and I fixed it
upstream:

http://git.fedorahosted.org/cgit/python-bugzilla.git/commit/?id=8b1a472dc45e0aaa3c054a002b499808642e5cd8

However multicall=True is the default behavior, so that option is only useful
for turning it off.

> Also, I really need to get flags back from getbugs, which requires you
> pass an extra_fields argument containing 'flags'.  Is it at all possible
> to do this with python-bugzilla or should I just bypass it and make an
> xmlrpc call myself?
> 

Yes:

bz = Bugzilla(url="https://bugzilla.redhat.com/xmlrpc.cgi")
fields_i_need = ["flags", "component", ...]
buglist = bz.query(bz.build_query(component="python-bugzilla",
include_fields=fields_i_need)

If you don't specify every field you need, you'll see a large slow down as we
need to hit xmlrpc again. But the above is the fastest way of doing things.

- Cole


More information about the python-bugzilla mailing list