[issue12065] test_ssl failure when svn.python.org fails to resolve
Antoine Pitrou
report at bugs.python.org
Thu May 12 21:41:14 CEST 2011
Antoine Pitrou <pitrou at free.fr> added the comment:
Which probably means it was a socket.timeout. When called on a non-SSL socket, connect_ex() returns 11 (EAGAIN) for timeout errors:
>>> s = socket.socket()
>>> s.settimeout(0.00001)
>>> s.connect_ex(("svn.python.org", 443))
11
But on SSL sockets, connect_ex() loses the errno (because it calls connect() on the underlying socket, not connect_ex(), and socket.timeout isn't raised with an errno):
>>> s = ssl.wrap_socket(socket.socket())
>>> s.settimeout(0.00001)
>>> print(s.connect_ex(("svn.python.org", 443)))
None
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12065>
_______________________________________
More information about the Python-bugs-list
mailing list