From: Victor Stinner Date: Wed, 25 Jun 2014 23:35:45 +0000 (+0200) Subject: asyncio: Handle error handler: enhance formatting of the callback X-Git-Tag: v3.4.2rc1~310 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=17b53f1301dfac6b57ac832e2db48ac2ba1d2f15;p=thirdparty%2FPython%2Fcpython.git asyncio: Handle error handler: enhance formatting of the callback --- diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py index 405448225e71..58c6bd53205b 100644 --- a/Lib/asyncio/events.py +++ b/Lib/asyncio/events.py @@ -89,8 +89,8 @@ class Handle: 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,