[python-bugzilla] Problem with RHBugzilla and _add_field_alias

Jason L Tibbitts III tibbs at math.uh.edu
Sat Nov 29 20:32:07 UTC 2014


OK, so it turns out that there is a hotfix in Fedora infra which is
overwriting base.py with a slightly modified 1.0 version.  Below is the
patch that's applied.  I note that the second hunk seems to be in 1.1,
but not the first.  I'm not really familiar with this patch or the
reasons it was applied, but maybe someone here has some idea of whether
or not it's still necessary.

commit d3c6ed32625f68fa7aeb4d1d62a012aa15ad1bcd
Author: Toshio くらとみ <toshio at lockbox01.phx2.fedoraproject.org>
Date:   Wed May 21 16:50:56 2014 +0000

    If we specify None for cookiefile, then we don't want cookies saved to disk.  They still have to be used within the process, though.

diff --git a/modules/hotfix/files/python-bugzilla/base.py b/modules/hotfix/files/python-bugzilla/base.py
index db4cd86..6a862ff 100644
--- a/modules/hotfix/files/python-bugzilla/base.py
+++ b/modules/hotfix/files/python-bugzilla/base.py
@@ -116,6 +116,8 @@ class RequestsTransport(Transport):
             Transport.__init__(self, use_datetime=False)
 
         self.verbose = debug
+        if cookiejar is None:
+            cookiejar = _build_cookiejar(None)
         self._cookiejar = cookiejar
 
         # transport constructor needs full url too, as xmlrpc does not pass
@@ -128,7 +130,7 @@ class RequestsTransport(Transport):
 
         self.request_defaults = {
             'cert': sslcafile if self.use_https else None,
-            'cookies': cookiejar if cookiejar else None,
+            'cookies': cookiejar,
             'verify': sslverify,
             'headers': {
                 'Content-Type': 'text/xml',


-- 
 Jason L Tibbitts III - tibbs at math.uh.edu - 713/743-3486 - 660PGH
 System Manager:  University of Houston Department of Mathematics 


More information about the python-bugzilla mailing list