mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Issue #10272: The ssl module now raises socket.timeout instead of a generic
SSLError on socket timeouts.
This commit is contained in:
parent
500be24a64
commit
c4df784514
5 changed files with 15 additions and 9 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue