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

@ -2,7 +2,7 @@
from setuptools import setup
setup(name='pyTelegramBotAPI',
version='0.1.4',
version='0.1.5',
description='Python Telegram bot api. ',
author='eternnoir',
author_email='eternnoir@gmail.com',

View File

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