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:
parent
3ab248ad9e
commit
7c1c982b3f
2
setup.py
2
setup.py
@ -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',
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user