diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-05-16 20:35:03 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-05-16 20:35:03 (GMT) |
commit | 27ba6388ed932af9e2c91e21d1ed3f260437e377 (patch) | |
tree | a54b1ad27bddee04e3e402416097c3e3cc0885d0 /Lib | |
parent | 65ec8ae47fa4bb0a3c2ef815ca1b03f3519398bc (diff) | |
download | cpython-27ba6388ed932af9e2c91e21d1ed3f260437e377.zip cpython-27ba6388ed932af9e2c91e21d1ed3f260437e377.tar.gz cpython-27ba6388ed932af9e2c91e21d1ed3f260437e377.tar.bz2 |
Do not fail if ssl fails to import
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_ssl.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 36ed3aa..cf5abe2 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -24,12 +24,13 @@ try: 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") |