1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Add try to polling getUpdates.

This commit is contained in:
eternnoir
2015-06-27 22:31:40 +08:00
parent 3ab248ad9e
commit 7c1c982b3f
2 changed files with 5 additions and 2 deletions

View File

@ -90,7 +90,10 @@ class TeleBot:
def __polling(self):
print 'telegram bot start polling'
while not self.__stop_polling:
self.get_update()
try:
self.get_update()
except Exception as e:
print e
time.sleep(self.interval)
print 'telegram bot stop polling'