[yum-commits] 4 commits - urlgrabber/grabber.py
James Antill
james at osuosl.org
Mon Mar 1 16:48:07 UTC 2010
urlgrabber/grabber.py | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 8e57ad3fbf14c55434eab5c04c4e00ba4f5986f9
Author: James Antill <james at and.org>
Date: Mon Mar 1 11:48:00 2010 -0500
Implement connection established timeout using, LOW_SPEED_LIMIT
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index e63d4bb..bd4da75 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -1179,6 +1179,8 @@ class PyCurlFileObject():
if hasattr(opts, 'timeout'):
timeout = int(opts.timeout or 0)
self.curl_obj.setopt(pycurl.CONNECTTIMEOUT, timeout)
+ self.curl_obj.setopt(pycurl.LOW_SPEED_LIMIT, 1)
+ self.curl_obj.setopt(pycurl.LOW_SPEED_TIME, timeout)
# ssl options
if self.scheme == 'https':
commit 09532daa0ec5dbd8993b1aa853354b747a06921f
Merge: 2d356df... 1103dbe...
Author: James Antill <james at and.org>
Date: Mon Mar 1 11:44:30 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:
add reset_curl_obj() to top layer of urlgrabber.grabber to close and reopen the curl object
commit 2d356df7a5e999abc15c7a6058eeb90ef1b9a96b
Merge: 772ab9d... c20d160...
Author: James Antill <james at and.org>
Date: Wed Jan 6 08:45:31 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:
Change default timeout to 300 (seconds), update documentation.
Move .cvsignore to .gitignore, add *.pyo.
- catch errors for when the file moves before we set the timestamp
point to a new url for the tests
- move the hdr_ended check around so we're resetting the size only when
- fix URLGRABBER_DEBUG calls by adding a _ function back - need to talk
when we redirect by header we might break, especially if we redirect wrongly.
if pycurl returns a float('inf') then return something that works
if we set a max_size from the header object - don't override it with opts.size
Add geturl() for yum include
diff --cc urlgrabber/grabber.py
index 22e6691,90311de..c0fa692
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@@ -1053,13 -1059,9 +1059,14 @@@ class PyCurlFileObject()
self._prog_running = False
self._error = (None, None)
self.size = 0
+ self._hdr_ended = False
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.
commit 772ab9df96b8c4c6e08969cfd89e625ad7b77573
Author: James Antill <james at and.org>
Date: Wed Oct 21 01:51:05 2009 -0400
Add geturl() for yum include
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index c4916d5..22e6691 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -1055,6 +1055,11 @@ class PyCurlFileObject():
self.size = 0
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.
More information about the Yum-commits
mailing list