mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Do not fail if ssl fails to import
This commit is contained in:
parent
65ec8ae47f
commit
27ba6388ed
1 changed files with 5 additions and 4 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue