Fix test so it is skipped properly if there is no SSL support.

This commit is contained in:
Neal Norwitz 2007-08-25 16:54:38 +00:00
parent 049da9e1cf
commit ce7fa56aac
1 changed files with 6 additions and 2 deletions

View File

@ -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