asyncio: Handle error handler: enhance formatting of the callback
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
index 4054482..58c6bd5 100644
--- 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,