> Hi,

Hi,

> on certain errors urlwatch crashes with a backtrace:
> $ urlwatch
> Traceback (most recent call last):
>   File "/usr/bin/urlwatch", line 231, in <module>
>     data = filter(url, urllib2.urlopen(request).read())
>   File "/usr/lib/python2.5/urllib2.py", line 124, in urlopen
>     return _opener.open(url, data)
>   File "/usr/lib/python2.5/urllib2.py", line 381, in open
>     response = self._open(req, data)
>   File "/usr/lib/python2.5/urllib2.py", line 399, in _open
>     '_open', req)
>   File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
>     result = func(*args)
>   File "/usr/lib/python2.5/urllib2.py", line 1107, in http_open
>     return self.do_open(httplib.HTTPConnection, req)
>   File "/usr/lib/python2.5/urllib2.py", line 1080, in do_open
>     r = h.getresponse()
>   File "/usr/lib/python2.5/httplib.py", line 928, in getresponse
>     response.begin()
>   File "/usr/lib/python2.5/httplib.py", line 385, in begin
>     version, status, reason = self._read_status()
>   File "/usr/lib/python2.5/httplib.py", line 349, in _read_status
>     raise BadStatusLine(line)
> httplib.BadStatusLine
> 
> The attached patch catches all http errors when retrieving URL
> content.

Thanks for the patch.

May I ask you what url make it crash so I can reproduce it.

Since I think the bug should be fixed in the urllib2 module, that would
help me.

Regards,

-- 
Franck Joncourt
http://debian.org - http://smhteam.info/wiki/

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to