mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-20 12:06:37 +00:00
Fix logging of functools.partial() callbacks
This commit is contained in:
parent
3d7bff64c2
commit
46b2d910d7
@ -283,16 +283,15 @@ class UpdateMethods(UserMethods):
|
|||||||
try:
|
try:
|
||||||
await callback(event)
|
await callback(event)
|
||||||
except events.StopPropagation:
|
except events.StopPropagation:
|
||||||
|
name = getattr(callback, '__name__', repr(callback))
|
||||||
__log__.debug(
|
__log__.debug(
|
||||||
"Event handler '{}' stopped chain of "
|
'Event handler "%s" stopped chain of propagation '
|
||||||
"propagation for event {}."
|
'for event %s.', name, type(event).__name__
|
||||||
.format(callback.__name__,
|
|
||||||
type(event).__name__)
|
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
except Exception:
|
except Exception:
|
||||||
__log__.exception('Unhandled exception on {}'
|
name = getattr(callback, '__name__', repr(callback))
|
||||||
.format(callback.__name__))
|
__log__.exception('Unhandled exception on %s', name)
|
||||||
|
|
||||||
async def _handle_auto_reconnect(self):
|
async def _handle_auto_reconnect(self):
|
||||||
# Upon reconnection, we want to send getState
|
# Upon reconnection, we want to send getState
|
||||||
|
Loading…
Reference in New Issue
Block a user