]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
test_protocol_sslv2(): Skip this test if ssl.PROTOCOL_SSLv2 is not
authorBarry Warsaw <barry@python.org>
Mon, 31 Oct 2011 18:08:15 +0000 (14:08 -0400)
committerBarry Warsaw <barry@python.org>
Mon, 31 Oct 2011 18:08:15 +0000 (14:08 -0400)
defined (as is the case with Ubuntu 11.10).

Lib/test/test_ssl.py

index ba1d868ccced8de8ed8551cc6605cfcabf67e4fe..07f9c866f1a0c348a9b8f4d32c643ace14d2aec3 100644 (file)
@@ -981,6 +981,8 @@ else:
         @skip_if_broken_ubuntu_ssl
         def test_protocol_sslv2(self):
             """Connecting to an SSLv2 server with various client options"""
+            if not hasattr(ssl, 'PROTOCOL_SSLv2'):
+                raise unittest.SkipTest('No SSLv2 available')
             if test_support.verbose:
                 sys.stdout.write("\n")
             if not hasattr(ssl, 'PROTOCOL_SSLv2'):