Kaydet (Commit) 27ba6388 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Do not fail if ssl fails to import

üst 65ec8ae4
...@@ -24,12 +24,13 @@ try: ...@@ -24,12 +24,13 @@ try:
import ssl import ssl
except ImportError: except ImportError:
skip_expected = True skip_expected = True
else:
PROTOCOLS = [
ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv3,
ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1
]
HOST = support.HOST 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) data_file = lambda name: os.path.join(os.path.dirname(__file__), name)
fsencode = lambda name: name.encode(sys.getfilesystemencoding(), "surrogateescape") fsencode = lambda name: name.encode(sys.getfilesystemencoding(), "surrogateescape")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment