From 83c154645da127e0d061f93a2d073ee1423e7e3d Mon Sep 17 00:00:00 2001 From: Nexus2k Date: Sat, 3 Sep 2016 10:07:35 +0200 Subject: [PATCH] Update telegram_handler.py to fix #5129 (#5139) --- pokemongo_bot/event_handlers/telegram_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pokemongo_bot/event_handlers/telegram_handler.py b/pokemongo_bot/event_handlers/telegram_handler.py index 6c5868136d..b9814555a9 100755 --- a/pokemongo_bot/event_handlers/telegram_handler.py +++ b/pokemongo_bot/event_handlers/telegram_handler.py @@ -79,7 +79,7 @@ def run(self): self.bot.logger.info("message from {} ({}): {}".format(update.message.from_user.username, update.message.from_user.id, update.message.text)) if self.master and self.master not in [update.message.from_user.id, "@{}".format(update.message.from_user.username)]: continue - if not re.match(r'^[0-9]+$', self.master): + if self.master and not re.match(r'^[0-9]+$', str(self.master)): # the "master" is not numeric, set self.master to update.message.chat_id and re-instantiate the handler newconfig = self.config newconfig['master'] = update.message.chat_id