From 8e6d4179546a084610e583dc6d36bd4d0ade8c1b Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 28 May 2014 13:32:40 -0700 Subject: [PATCH] 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. --- bugzilla/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bugzilla/base.py b/bugzilla/base.py index 84d4be3..bea7112 100644 --- a/bugzilla/base.py +++ b/bugzilla/base.py @@ -181,6 +181,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 @@ -193,7 +195,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', -- 1.9.3