diff --git a/django_telegrambot/apps.py b/django_telegrambot/apps.py index 869925d..2c06507 100644 --- a/django_telegrambot/apps.py +++ b/django_telegrambot/apps.py @@ -167,7 +167,7 @@ def ready(self): if self.mode == WEBHOOK_MODE: try: bot = telegram.Bot(token=token) - except InvalidToken + except InvalidToken: logger.error('Invalid Token : {}'.format(token)) return DjangoTelegramBot.dispatchers.append(Dispatcher(bot, None, workers=0)) @@ -189,7 +189,7 @@ def ready(self): DjangoTelegramBot.updaters.append(updater) DjangoTelegramBot.dispatchers.append(updater.dispatcher) DjangoTelegramBot.__used_tokens.add(token) - except InvalidToken + except InvalidToken: logger.error('Invalid Token : {}'.format(token)) return