diff options
| author | Nadeem Vawda <nadeem.vawda@gmail.com> | 2013-03-03 22:48:15 +0100 |
|---|---|---|
| committer | Nadeem Vawda <nadeem.vawda@gmail.com> | 2013-03-03 22:48:15 +0100 |
| commit | 6386e17f392d984fa5d16df4c6c74314aecbb588 (patch) | |
| tree | 7f2de19d64894f72e0e2ce6d8111895182bae1a9 /Lib/test/test_ssl.py | |
| parent | b394c1dac8eaf398ed245c7599474b6c4213d03f (diff) | |
| parent | ad246bfb712f04b34e993b0e70e470f6d759e736 (diff) | |
| download | cpython-git-6386e17f392d984fa5d16df4c6c74314aecbb588.tar.gz | |
Issue #13898: test_ssl no longer prints a spurious stack trace on Ubuntu.
Diffstat (limited to 'Lib/test/test_ssl.py')
| -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 32b6131886..8735832433 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. |
