Issue #10272: The ssl module now raises socket.timeout instead of a generic
SSLError on socket timeouts.
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 @@
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 @@
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()