Issue #10272: The ssl module now raises socket.timeout instead of a generic

SSLError on socket timeouts.
This commit is contained in:
Antoine Pitrou 2010-12-03 19:59:41 +00:00
parent 500be24a64
commit c4df784514
5 changed files with 15 additions and 9 deletions

View file

@ -1499,7 +1499,7 @@ else:
c.settimeout(0.2)
c.connect((host, port))
# Will attempt handshake and time out
self.assertRaisesRegex(ssl.SSLError, "timed out",
self.assertRaisesRegex(socket.timeout, "timed out",
ssl.wrap_socket, c)
finally:
c.close()
@ -1508,7 +1508,7 @@ else:
c = ssl.wrap_socket(c)
c.settimeout(0.2)
# Will attempt handshake and time out
self.assertRaisesRegex(ssl.SSLError, "timed out",
self.assertRaisesRegex(socket.timeout, "timed out",
c.connect, (host, port))
finally:
c.close()