bpo-34630: Skip logging SSL certificate errors by asyncio code (GH-9169)

This commit is contained in:
Andrew Svetlov 2018-09-12 14:03:54 -07:00 committed by GitHub
parent 5b10d5111d
commit 0dd71807a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,2 @@
Don't log SSL certificate errors in asyncio code (connection error logging
is skipped already).