Message115798
When you call socket.create_connection() and it fails because it hits the socket timeout, the socket.timeout error is recast as a generic socket.error, which makes analyzing the failure more difficult (also, it means the "errno" attribute is lost for other types of errors):
>>> 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
>>> socket.create_connection(("www.yahoo.fr", 80))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/antoine/py3k/__svn__/Lib/socket.py", line 319, in create_connection
raise err
socket.error: timed out |
|
Date |
User |
Action |
Args |
2010-09-07 19:50:14 | pitrou | set | recipients:
+ pitrou, facundobatista, exarkun, giampaolo.rodola |
2010-09-07 19:50:14 | pitrou | set | messageid: <1283889014.5.0.630828935384.issue9792@psf.upfronthosting.co.za> |
2010-09-07 19:50:11 | pitrou | link | issue9792 messages |
2010-09-07 19:50:10 | pitrou | create | |
|