[issue9792] create_connection() recasts timeout errors

Giampaolo Rodola' report at bugs.python.org
Tue Sep 7 22:17:45 CEST 2010


Giampaolo Rodola' <g.rodola at gmail.com> added the comment:

On Ubuntu 10.04:

giampaolo at ubuntu:~/svn/python-3.2$ ./python 
Python 3.2a1+ (py3k:84457, Sep  3 2010, 20:18:38) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> import socket
>>> socket.setdefaulttimeout(0.000001)
>>> s = socket.socket()
>>> s.connect(("www.yahoo.fr", 80))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
socket.timeout: timed out
>>>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9792>
_______________________________________


More information about the Python-bugs-list mailing list