"dumbkiwi" <[EMAIL PROTECTED]> writes:

> I have written a script that uses the urllib2 module to download web
> pages for parsing.
> 
> If there is no network interface, urllib2 hangs for a very long time
> before it raises an exception.  I have set the socket timeout with
> socket.setdefaulttimeout(), however, where there is no network
> interface, this seems to be ignored - presumably, because without a
> network interface, there is nothing for the socket module to interact
> with.
> 
> So, can someone point me in the right direction, so that I can catch
> an exception where there is no network interface?

Are you on Windows or something Unixy?

Presumably Windows?  (Unix systems almost always have at least a
loopback interface)


John

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to