Skip to content

Commit

Permalink
Update telegram_handler.py to fix #5129 (#5139)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nexus2k authored and mjmadsen committed Sep 3, 2016
1 parent 829ae31 commit 83c1546
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pokemongo_bot/event_handlers/telegram_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 83c1546

Please sign in to comment.