Issue #13898: test_ssl no longer prints a spurious stack trace on Ubuntu.
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 4bf7ad8..815475e 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -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.