Forgot the actual try catch clause

This commit is contained in:
JosXa 2018-02-20 15:14:10 +01:00
parent 417947d520
commit 2bd63f7887

View File

@ -1780,7 +1780,11 @@ class TelegramClient(TelegramBareClient):
event = builder.build(update)
if event:
event._client = self
callback(event)
try:
callback(event)
except StopPropagation:
__log__.info("Event handler '{}' stopped chain of propagation for update {}.".format(
callback.__name__, type(update).__name__))
def add_event_handler(self, callback, event):
"""