From 823df7b04aa2da3778ea0a4c442218416b4ad39f Mon Sep 17 00:00:00 2001 From: b3yond Date: Fri, 14 Sep 2018 19:59:45 +0200 Subject: [PATCH] fix TypeError when updates == None --- active_bots/telegrambot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/active_bots/telegrambot.py b/active_bots/telegrambot.py index e916943..00fb01a 100644 --- a/active_bots/telegrambot.py +++ b/active_bots/telegrambot.py @@ -17,6 +17,8 @@ class TelegramBot(Bot): except TypeError: updates = tb.get_updates().wait() reports = [] + if updates == None: + return reports for update in updates: if update == 404: return reports