[yum-commits] 4 commits - urlgrabber/grabber.py
skvidal at osuosl.org
skvidal at osuosl.org
Fri Mar 18 16:13:33 UTC 2011
urlgrabber/grabber.py | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
New commits:
commit ee6fea9451c6893744a00871fb0dc7601b468aa8
Merge: b6bfd59... d47bac8...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Mar 18 10:24:15 2011 -0400
Merge branch 'master' of ssh://yum.baseurl.org/srv/projects/yum/git/urlgrabber
* 'master' of ssh://yum.baseurl.org/srv/projects/yum/git/urlgrabber:
Fix non-pycurl error handling in _do_perform().
commit b6bfd59c4393ea8ba5165aabb249c37d6d2a9931
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Mar 18 10:23:09 2011 -0400
- if we're not using keepalives then don't reuse the connections
- ssl verify host needs to be '2' when it is set to true - 1 is kinda meaningless
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index 29793f0..aba9bbc 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -1193,6 +1193,9 @@ class PyCurlFileObject(object):
if not opts:
opts = self.opts
+ # keepalives
+ if not opts.keepalive:
+ self.curl_obj.setopt(pycurl.FORBID_REUSE, 1)
# defaults we're always going to set
self.curl_obj.setopt(pycurl.NOPROGRESS, False)
@@ -1236,7 +1239,8 @@ class PyCurlFileObject(object):
self.curl_obj.setopt(pycurl.CAPATH, opts.ssl_ca_cert)
self.curl_obj.setopt(pycurl.CAINFO, opts.ssl_ca_cert)
self.curl_obj.setopt(pycurl.SSL_VERIFYPEER, opts.ssl_verify_peer)
- self.curl_obj.setopt(pycurl.SSL_VERIFYHOST, opts.ssl_verify_host)
+ if opts.ssl_verify_host: # 1 is meaningless to curl
+ self.curl_obj.setopt(pycurl.SSL_VERIFYHOST, 2)
if opts.ssl_key:
self.curl_obj.setopt(pycurl.SSLKEY, opts.ssl_key)
if opts.ssl_key_type:
commit 23fd3669436784d0e1a86907e63e96c32e085b68
Merge: 2b9a4fd... 86c9941...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Dec 17 16:18:58 2010 -0500
Merge branch 'master' of ssh://yum.baseurl.org/srv/projects/yum/git/urlgrabber
* 'master' of ssh://yum.baseurl.org/srv/projects/yum/git/urlgrabber:
Save where we downloaded the file from, in an xattr (requires pyxattr).
Decode error 52, BZ 565646
commit 2b9a4fde85eb24969493171642e6cd0c61b84cda
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Mon Sep 27 13:56:24 2010 -0400
remove one of the geturl() methods since they are duplicate AND identical.
https://bugzilla.redhat.com/show_bug.cgi?id=637684
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index b2770c5..cc20080 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -1098,11 +1098,6 @@ class PyCurlFileObject(object):
self._do_open()
- def geturl(self):
- """ Provide the geturl() method, used to be got from
- urllib.addinfourl, via. urllib.URLopener.* """
- return self.url
-
def __getattr__(self, name):
"""This effectively allows us to wrap at the instance level.
Any attribute not found in _this_ object will be searched for
More information about the Yum-commits
mailing list