diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2018-09-12 14:03:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 14:03:54 -0700 |
commit | 0dd71807a98c4a86ece2aea869ea99f09204b16b (patch) | |
tree | 24739800640a07821898beb40f2885e9935477a9 /Lib/asyncio/base_events.py | |
parent | 5b10d5111d7a855297654af9045f8907b7d3dd08 (diff) | |
download | cpython-git-0dd71807a98c4a86ece2aea869ea99f09204b16b.tar.gz |
bpo-34630: Skip logging SSL certificate errors by asyncio code (GH-9169)
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r-- | Lib/asyncio/base_events.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 046743864f..492e377d09 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -62,6 +62,9 @@ _MIN_CANCELLED_TIMER_HANDLES_FRACTION = 0.5 _FATAL_ERROR_IGNORE = (BrokenPipeError, ConnectionResetError, ConnectionAbortedError) +if ssl is not None: + _FATAL_ERROR_IGNORE = _FATAL_ERROR_IGNORE + (ssl.SSLCertVerificationError,) + _HAS_IPv6 = hasattr(socket, 'AF_INET6') # Maximum timeout passed to select to avoid OS limitations |