[Yum-devel] [PATCH] 'proxy=_none_' should disable default proxies
Zdeněk Pavlas
zpavlas at redhat.com
Thu Apr 19 13:12:17 UTC 2012
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.
---
urlgrabber/grabber.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
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)
--
1.7.4.4
More information about the Yum-devel
mailing list