webchecker BUG?

Fredrik Lundh fredrik at pythonware.com
Sun May 13 07:36:58 EDT 2001


Robin Becker wrote:
> Can anyone explain what's going on here? I'm running python2.0 on
> freeBSD 4.2 to check a remote site using

>   File "/usr/local/lib/python2.0/urllib.py", line 692, in retrfile
>     if reason[:3] != '550':
> TypeError: sequence index must be integer

sure looks like a bug in urllib: guess nobody's updated it after
Python started using class exceptions (in recent versions, the
reason variable contains an exception instance, not a string).

changing the line to something like this probably helps:

>     if str(reason[:3]) != '550':

(please report this to the sourceforge too!)

Cheers /F






More information about the Python-list mailing list