[yum-commits] 2 commits - urlgrabber/grabber.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Fri Apr 20 06:48:27 UTC 2012
urlgrabber/grabber.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 26f05e195a9641778e47f63f83bc2dd9822a6a73
Author: ZdenÄk Pavlas <zpavlas at redhat.com>
Date: Thu Apr 19 17:20:03 2012 +0200
use proxy='' to disable default proxies
Instead of ignoring proxy settings '_none_' or '',
use it to disable default proxies in libcurl.
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index c334242..38ae1f7 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -830,8 +830,9 @@ class URLGrabberOptions:
proxy = self.proxies.get('https')
elif scheme == 'https':
proxy = self.proxies.get('http')
- if proxy != '_none_':
- self.proxy = proxy
+ if proxy == '_none_':
+ proxy = ''
+ self.proxy = proxy
return
if self.libproxy:
@@ -1318,7 +1319,7 @@ class PyCurlFileObject(object):
self.curl_obj.setopt(pycurl.MAX_RECV_SPEED_LARGE, int(opts.raw_throttle()))
# proxy
- if opts.proxy:
+ if opts.proxy is not None:
self.curl_obj.setopt(pycurl.PROXY, opts.proxy)
self.curl_obj.setopt(pycurl.PROXYAUTH, pycurl.HTTPAUTH_ANY)
commit b50f8cf4745c66c54564e06065492e667075a01a
Author: ZdenÄk Pavlas <zpavlas at redhat.com>
Date: Thu Apr 19 17:14:27 2012 +0200
Revert "'proxy=_none_' should disable default proxies"
This reverts commit d4aab164239b916b6a7c1da67b5e72fb088fc579.
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index 898d371..c334242 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -830,7 +830,8 @@ class URLGrabberOptions:
proxy = self.proxies.get('https')
elif scheme == 'https':
proxy = self.proxies.get('http')
- self.proxy = proxy
+ if proxy != '_none_':
+ self.proxy = proxy
return
if self.libproxy:
@@ -1317,9 +1318,7 @@ class PyCurlFileObject(object):
self.curl_obj.setopt(pycurl.MAX_RECV_SPEED_LARGE, int(opts.raw_throttle()))
# proxy
- if opts.proxy == '_none_':
- self.curl_obj.setopt(pycurl.PROXY, '')
- elif opts.proxy:
+ if 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