[Python-checkins] cpython (3.4): asyncio: Handle error handler: enhance formatting of the callback

victor.stinner python-checkins at python.org
Thu Jun 26 01:37:29 CEST 2014


http://hg.python.org/cpython/rev/8cd3e6b0f5cc
changeset:   91418:8cd3e6b0f5cc
branch:      3.4
parent:      91416:4e4c6e2ed0c5
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Jun 26 01:35:45 2014 +0200
summary:
  asyncio: Handle error handler: enhance formatting of the callback

files:
  Lib/asyncio/events.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
--- a/Lib/asyncio/events.py
+++ b/Lib/asyncio/events.py
@@ -89,8 +89,8 @@
         try:
             self._callback(*self._args)
         except Exception as exc:
-            msg = 'Exception in callback {}{!r}'.format(self._callback,
-                                                        self._args)
+            cb = _format_callback(self._callback, self._args)
+            msg = 'Exception in callback {}'.format(cb)
             self._loop.call_exception_handler({
                 'message': msg,
                 'exception': exc,

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list