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).

_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to