From ce7fa56aac602a3e379e9f8f49292aa2ba9cb717 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sat, 25 Aug 2007 16:54:38 +0000 Subject: [PATCH] Fix test so it is skipped properly if there is no SSL support. --- Lib/test/test_ssl.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 0188dc2a223..3311f0cab27 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