Bug 443886 - broken urlgrab when regetting an already downloaded file
broken urlgrab when regetting an already downloaded file
Status: CLOSED DUPLICATE of bug 442165
Product: Fedora
Classification: Fedora
Component: python-urlgrabber (Show other bugs)
8
noarch Linux
low Severity low
: ---
: ---
Assigned To: Jeremy Katz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-23 17:06 EDT by Matteo Castellini
Modified: 2008-05-28 16:03 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-28 16:03:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Matteo Castellini 2008-04-23 17:06:54 EDT
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).
Comment 1 Jeremy Katz 2008-05-28 16:03:44 EDT

*** This bug has been marked as a duplicate of 442165 ***

Note You need to log in before you can comment on or make changes to this bug.