diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-12-03 19:59:41 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-12-03 19:59:41 (GMT) |
commit | c4df7845143f9afe0d20f4421a41904f3cbb991a (patch) | |
tree | f41b148eba51ce36c7d45aaa15625cc41d1786b9 /Lib/test/test_ssl.py | |
parent | 500be24a64ff188b8cfcc1ad75d9b556bbf6ce86 (diff) | |
download | cpython-c4df7845143f9afe0d20f4421a41904f3cbb991a.zip cpython-c4df7845143f9afe0d20f4421a41904f3cbb991a.tar.gz cpython-c4df7845143f9afe0d20f4421a41904f3cbb991a.tar.bz2 |
Issue #10272: The ssl module now raises socket.timeout instead of a generic
SSLError on socket timeouts.
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r-- | Lib/test/test_ssl.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index c9f03c7..e5a07a3 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -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() |