diff options
author | Christian Heimes <christian@python.org> | 2021-05-03 07:38:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-03 07:38:56 (GMT) |
commit | 37ebdf0a866457ce825d0ff6e498a10938895760 (patch) | |
tree | 9bf3e95892b07549868a13e891c1584d230f2fc8 /Lib/asyncio/sslproto.py | |
parent | 99ad742ea913e421d012c1a623029eac31bdfe85 (diff) | |
download | cpython-37ebdf0a866457ce825d0ff6e498a10938895760.zip cpython-37ebdf0a866457ce825d0ff6e498a10938895760.tar.gz cpython-37ebdf0a866457ce825d0ff6e498a10938895760.tar.bz2 |
bpo-44011: Fix asyncio tests without ssl module (GH-25840)
Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Lib/asyncio/sslproto.py')
-rw-r--r-- | Lib/asyncio/sslproto.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py index e71875b..79734ab 100644 --- a/Lib/asyncio/sslproto.py +++ b/Lib/asyncio/sslproto.py @@ -12,7 +12,8 @@ from . import protocols from . import transports from .log import logger -SSLAgainErrors = (ssl.SSLWantReadError, ssl.SSLSyscallError) +if ssl is not None: + SSLAgainErrors = (ssl.SSLWantReadError, ssl.SSLSyscallError) class SSLProtocolState(enum.Enum): |