summaryrefslogtreecommitdiff
path: root/Lib/asyncio/base_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-04-01 21:43:39 +0200
committerVictor Stinner <victor.stinner@gmail.com>2016-04-01 21:43:39 +0200
commitc94a93aecbca31939086bc65f09f683bd521a2f6 (patch)
tree2844e6f0059f3894391a8558ad4b7d6eaccbb143 /Lib/asyncio/base_events.py
parent2ba8ece5beb64126c719a837431cee3de890e451 (diff)
downloadcpython-git-c94a93aecbca31939086bc65f09f683bd521a2f6.tar.gz
asyncio: Don't log ConnectionAbortedError
Issue #26509: In fatal error handlers, don't log ConnectionAbortedError which occur on Windows.
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r--Lib/asyncio/base_events.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index 9d07673fba..3703480eba 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -54,6 +54,12 @@ _MIN_SCHEDULED_TIMER_HANDLES = 100
# before cleanup of cancelled handles is performed.
_MIN_CANCELLED_TIMER_HANDLES_FRACTION = 0.5
+# Exceptions which must not call the exception handler in fatal error
+# methods (_fatal_error())
+_FATAL_ERROR_IGNORE = (BrokenPipeError,
+ ConnectionResetError, ConnectionAbortedError)
+
+
def _format_handle(handle):
cb = handle._callback
if inspect.ismethod(cb) and isinstance(cb.__self__, tasks.Task):