[Python-checkins] cpython: asyncio: _fatal_error() of _UnixWritePipeTransport and
guido.van.rossum
python-checkins at python.org
Wed Jan 29 23:41:51 CET 2014
http://hg.python.org/cpython/rev/f21a0ad40734
changeset: 88819:f21a0ad40734
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Jan 29 13:12:03 2014 -0800
summary:
asyncio: _fatal_error() of _UnixWritePipeTransport and _ProactorBasePipeTransport shouldn't log BrokenPipeError nor ConnectionResetError.
(Same behaviour as _SelectorTransport._fatal_error().)
files:
Lib/asyncio/proactor_events.py | 3 ++-
Lib/asyncio/unix_events.py | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py
--- a/Lib/asyncio/proactor_events.py
+++ b/Lib/asyncio/proactor_events.py
@@ -54,7 +54,8 @@
self._read_fut.cancel()
def _fatal_error(self, exc):
- logger.exception('Fatal error for %s', self)
+ if not isinstance(exc, (BrokenPipeError, ConnectionResetError)):
+ logger.exception('Fatal error for %s', self)
self._force_close(exc)
def _force_close(self, exc):
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -363,7 +363,8 @@
def _fatal_error(self, exc):
# should be called by exception handler only
- logger.exception('Fatal error for %s', self)
+ if not isinstance(exc, (BrokenPipeError, ConnectionResetError)):
+ logger.exception('Fatal error for %s', self)
self._close(exc)
def _close(self, exc=None):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list