changeset: 82463:77cbb3ba5d40 branch: 3.3 parent: 82460:30e643e36bae parent: 82462:fa24c1382bd3 user: Nadeem Vawda date: Sun Mar 03 22:44:22 2013 +0100 files: Lib/test/test_ssl.py Misc/NEWS description: Issue #13898: test_ssl no longer prints a spurious stack trace on Ubuntu. diff -r 30e643e36bae -r 77cbb3ba5d40 Lib/test/test_ssl.py --- a/Lib/test/test_ssl.py Sun Mar 03 10:45:05 2013 -0800 +++ b/Lib/test/test_ssl.py Sun Mar 03 22:44:22 2013 +0100 @@ -942,7 +942,11 @@ 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. diff -r 30e643e36bae -r 77cbb3ba5d40 Misc/NEWS --- a/Misc/NEWS Sun Mar 03 10:45:05 2013 -0800 +++ b/Misc/NEWS Sun Mar 03 22:44:22 2013 +0100 @@ -635,6 +635,8 @@ Tests ----- +- Issue #13898: test_ssl no longer prints a spurious stack trace on Ubuntu. + - Issue #17249: convert a test in test_capi to use unittest and reap threads. - Issue #17041: Fix testing when Python is configured with the

AltStyle によって変換されたページ (->オリジナル) /