From 23fd39e2c8234c9b5532a1c8e8de387922108e4b Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 9 Nov 2018 09:21:01 +0100 Subject: [PATCH] Update dispatcher.py --- pyrogram/client/dispatcher/dispatcher.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pyrogram/client/dispatcher/dispatcher.py b/pyrogram/client/dispatcher/dispatcher.py index f1c14fbe..fa65f987 100644 --- a/pyrogram/client/dispatcher/dispatcher.py +++ b/pyrogram/client/dispatcher/dispatcher.py @@ -143,13 +143,15 @@ class Dispatcher: if handler.check(update): args = (update,) - if args is not None: - try: - handler.callback(self.client, *args) - except Exception as e: - log.error(e, exc_info=True) - finally: - break + if args is None: + continue + + try: + handler.callback(self.client, *args) + except Exception as e: + log.error(e, exc_info=True) + finally: + break except Exception as e: log.error(e, exc_info=True)