[UG] bad link in example page and query on http status code

James Antill james at fedoraproject.org
Tue Apr 29 03:50:06 UTC 2014


On Mon, 2014-04-28 at 19:28 +0100, Tristan Hill wrote:
> Hi,
> 
> I spotted a broken link on http://urlgrabber.baseurl.org/examples.html
> - to the module documentation.

 Ahh, it went to duke still ... thanks, fixed.

> Also I have the following code:
> 
>         g = urlgrabber.grabber.URLGrabber(reget='simple')
>         try:
>             g.urlgrab(url, filename=filepath)
>         except urlgrabber.grabber.URLGrabError, e:
>             if e.exception[1] != 'The requested URL returned error:
> 416 Requested Range Not Satisfiable':
>                 raise
> 
> I am getting the 416 exception when the file is complete:

 This is normal, when you say I have 500 bytes give me the rest and the
file is 500 bytes long then http will respond with 416.

> urlgrabber.grabber.URLGrabError: [Errno 14] PYCURL ERROR 22 - "The
> requested URL returned error: 416 Requested Range Not Satisfiable"
> 
> There appears to be no way to get the http code.  e.code equals 22.
> Can anyone advise?

 I'm not sure if you have the latest urlgrabber from git? As it looks
like that should give it (unless the http error is in the 200 range).



More information about the Yum-devel mailing list