Hide Forgot
Description of problem: While using an instance of urlgrabber.grabber.URLGrabber with reget turned on (both reget='simple' and reget='check_timestamp') if I try to get an already completely downloaded file it raises an exception. Version-Release number of selected component (if applicable): python-urlgrabber-3.0.0-3.fc8 How reproducible: Always Steps to Reproduce: 1.Execute the following Python code: from urlgrabber import grabber grab = grabber.URLGrabber(reget='simple') grab.urlgrab('http://www.ietf.org/rfc/rfc1.txt') grab.urlgrab('http://www.ietf.org/rfc/rfc1.txt') Actual results: >>> from urlgrabber import grabber >>> grab = grabber.URLGrabber(reget='simple') >>> grab.urlgrab('http://www.ietf.org/rfc/rfc1.txt') 'rfc1.txt' >>> grab.urlgrab('http://www.ietf.org/rfc/rfc1.txt') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 928, in urlgrab return self._retry(opts, retryfunc, url, filename) File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 846, in _retry r = apply(func, (opts,) + args, {}) File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 914, in retryfunc fo = URLGrabberFileObject(url, filename, opts) File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 1002, in __init__ self._do_open() File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 1069, in _do_open fo, hdr = self._make_request(req, opener) File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 1174, in _make_request raise URLGrabError(9, str(e)) urlgrabber.grabber.URLGrabError: [Errno 9] Requested Range Not Satisfiable Expected results: >>> from urlgrabber import grabber >>> grab = grabber.URLGrabber(reget='simple') >>> grab.urlgrab('http://www.ietf.org/rfc/rfc1.txt') 'rfc1.txt' >>> grab.urlgrab('http://www.ietf.org/rfc/rfc1.txt') 'rfc1.txt' Additional info: Everything works fine with reget=None. This behaviour doesn't happen for ftp:// and file:// urls. Can be reproduced in rawhide too (python-urlgrabber-3.0.0-6.fc9).
*** This bug has been marked as a duplicate of 442165 ***