From: Barry Warsaw Date: Mon, 31 Oct 2011 18:08:15 +0000 (-0400) Subject: test_protocol_sslv2(): Skip this test if ssl.PROTOCOL_SSLv2 is not X-Git-Tag: v2.7.3rc1~344 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=39aec0171d04adcbc17e856418ea9530263553d2;p=thirdparty%2FPython%2Fcpython.git test_protocol_sslv2(): Skip this test if ssl.PROTOCOL_SSLv2 is not defined (as is the case with Ubuntu 11.10). --- diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index ba1d868ccced..07f9c866f1a0 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -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'):