Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
askovpen committed Aug 30, 2016
1 parent 722ec39 commit 09a0290
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pokemongo_bot/event_handlers/telegram_handler.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
from pokemongo_bot.event_manager import EventHandler
from telegram.error import NetworkError, Unauthorized
from pokemongo_bot.base_dir import _base_dir
import json
import os
Expand Down Expand Up @@ -86,9 +85,9 @@ def run(self):
"/info - info about bot"
)
self._tbot.sendMessage(chat_id=update.message.chat_id, parse_mode='Markdown', text="\n".join(res))
except NetworkError:
except telegram.error.NetworkError:
time.sleep(1)
except Unauthorized:
except telegram.error.Unauthorized:
self.update_id += 1

class TelegramHandler(EventHandler):
Expand Down

0 comments on commit 09a0290

Please sign in to comment.