summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-25 16:54:38 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-25 16:54:38 (GMT)
commitce7fa56aac602a3e379e9f8f49292aa2ba9cb717 (patch)
tree58bd8a84431dbcd85e9a3b854465740d1391422b /Lib
parent049da9e1cf214800cb2391415fdb559f5b000cef (diff)
downloadcpython-ce7fa56aac602a3e379e9f8f49292aa2ba9cb717.zip
cpython-ce7fa56aac602a3e379e9f8f49292aa2ba9cb717.tar.gz
cpython-ce7fa56aac602a3e379e9f8f49292aa2ba9cb717.tar.bz2
Fix test so it is skipped properly if there is no SSL support.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_ssl.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 0188dc2..3311f0c 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -165,8 +165,12 @@ class threadedEchoServer(threading.Thread):
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