diff options
author | Nadeem Vawda <nadeem.vawda@gmail.com> | 2013-03-03 21:48:15 (GMT) |
---|---|---|
committer | Nadeem Vawda <nadeem.vawda@gmail.com> | 2013-03-03 21:48:15 (GMT) |
commit | 6386e17f392d984fa5d16df4c6c74314aecbb588 (patch) | |
tree | 7f2de19d64894f72e0e2ce6d8111895182bae1a9 /Lib | |
parent | b394c1dac8eaf398ed245c7599474b6c4213d03f (diff) | |
parent | ad246bfb712f04b34e993b0e70e470f6d759e736 (diff) | |
download | cpython-6386e17f392d984fa5d16df4c6c74314aecbb588.zip cpython-6386e17f392d984fa5d16df4c6c74314aecbb588.tar.gz cpython-6386e17f392d984fa5d16df4c6c74314aecbb588.tar.bz2 |
Issue #13898: test_ssl no longer prints a spurious stack trace on Ubuntu.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_ssl.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 32b6131..8735832 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -979,7 +979,11 @@ else: self.sslconn = self.server.context.wrap_socket( self.sock, server_side=True) self.server.selected_protocols.append(self.sslconn.selected_npn_protocol()) - except ssl.SSLError as e: + except (ssl.SSLError, ConnectionResetError) as e: + # We treat ConnectionResetError as though it were an + # SSLError - OpenSSL on Ubuntu abruptly closes the + # connection when asked to use an unsupported protocol. + # # XXX Various errors can have happened here, for example # a mismatching protocol version, an invalid certificate, # or a low-level bug. This should be made more discriminating. |