[Python-checkins] r81236 - python/branches/py3k/Lib/test/test_ssl.py

antoine.pitrou python-checkins at python.org
Sun May 16 22:35:03 CEST 2010


Author: antoine.pitrou
Date: Sun May 16 22:35:03 2010
New Revision: 81236

Log:
Do not fail if ssl fails to import



Modified:
   python/branches/py3k/Lib/test/test_ssl.py

Modified: python/branches/py3k/Lib/test/test_ssl.py
==============================================================================
--- python/branches/py3k/Lib/test/test_ssl.py	(original)
+++ python/branches/py3k/Lib/test/test_ssl.py	Sun May 16 22:35:03 2010
@@ -24,12 +24,13 @@
     import ssl
 except ImportError:
     skip_expected = True
+else:
+    PROTOCOLS = [
+        ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv3,
+        ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1
+    ]
 
 HOST = support.HOST
-PROTOCOLS = [
-    ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv3,
-    ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1
-]
 
 data_file = lambda name: os.path.join(os.path.dirname(__file__), name)
 fsencode = lambda name: name.encode(sys.getfilesystemencoding(), "surrogateescape")


More information about the Python-checkins mailing list