[Python-checkins] r57466 - python/trunk/Lib/test/test_ssl.py

neal.norwitz python-checkins at python.org
Sat Aug 25 18:54:38 CEST 2007


Author: neal.norwitz
Date: Sat Aug 25 18:54:38 2007
New Revision: 57466

Modified:
   python/trunk/Lib/test/test_ssl.py
Log:
Fix test so it is skipped properly if there is no SSL support.

Modified: python/trunk/Lib/test/test_ssl.py
==============================================================================
--- python/trunk/Lib/test/test_ssl.py	(original)
+++ python/trunk/Lib/test/test_ssl.py	Sat Aug 25 18:54:38 2007
@@ -165,8 +165,12 @@
                     sys.stderr.write(string.join(
                         traceback.format_exception(*sys.exc_info())))
 
-    def __init__(self, port, certificate, ssl_version=ssl.PROTOCOL_TLSv1,
-                 certreqs=ssl.CERT_NONE, cacerts=None):
+    def __init__(self, port, certificate, ssl_version=None,
+                 certreqs=None, cacerts=None):
+        if ssl_version is None:
+            ssl_version = ssl.PROTOCOL_TLSv1
+        if certreqs is None:
+            certreqs = ssl.CERT_NONE
         self.certificate = certificate
         self.protocol = ssl_version
         self.certreqs = certreqs


More information about the Python-checkins mailing list