]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
asyncio: Handle error handler: enhance formatting of the callback
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 25 Jun 2014 23:35:45 +0000 (01:35 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 25 Jun 2014 23:35:45 +0000 (01:35 +0200)
Lib/asyncio/events.py

index 405448225e71c7e27e7d3d895080c4c5cfbe6427..58c6bd53205ba99a141c4904c59de97196fba02f 100644 (file)
@@ -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,