[yum-commits] urlgrabber/grabber.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Thu Apr 19 14:17:48 UTC 2012
urlgrabber/grabber.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit d4aab164239b916b6a7c1da67b5e72fb088fc579
Author: ZdenÄk Pavlas <zpavlas at redhat.com>
Date: Thu Apr 19 15:07:49 2012 +0200
'proxy=_none_' should disable default proxies
libcurl uses default proxies. to disable that, we have to set
it explicitly to ''. '_none_' was once used for this purpose
so make it work again.
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index c334242..898d371 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -830,8 +830,7 @@ class URLGrabberOptions:
proxy = self.proxies.get('https')
elif scheme == 'https':
proxy = self.proxies.get('http')
- if proxy != '_none_':
- self.proxy = proxy
+ self.proxy = proxy
return
if self.libproxy:
@@ -1318,7 +1317,9 @@ class PyCurlFileObject(object):
self.curl_obj.setopt(pycurl.MAX_RECV_SPEED_LARGE, int(opts.raw_throttle()))
# proxy
- if opts.proxy:
+ if opts.proxy == '_none_':
+ self.curl_obj.setopt(pycurl.PROXY, '')
+ elif opts.proxy:
self.curl_obj.setopt(pycurl.PROXY, opts.proxy)
self.curl_obj.setopt(pycurl.PROXYAUTH, pycurl.HTTPAUTH_ANY)
More information about the Yum-commits
mailing list