mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-16 12:25:45 +01:00
Merge remote-tracking branch 'upstream/master' into bot-api-2.0
This commit is contained in:
commit
15cc410c10
3 changed files with 4 additions and 4 deletions
|
@ -79,7 +79,7 @@ def run_async(func):
|
|||
return async_func
|
||||
|
||||
|
||||
class Dispatcher:
|
||||
class Dispatcher(object):
|
||||
"""
|
||||
This class dispatches all kinds of updates to its registered handlers.
|
||||
A handler is a function that usually takes the following parameters
|
||||
|
@ -185,7 +185,7 @@ class Dispatcher:
|
|||
if self.__stop_event.is_set():
|
||||
self.logger.debug('orderly stopping')
|
||||
break
|
||||
elif self.__stop_event.is_set():
|
||||
elif self.__exception_event.is_set():
|
||||
self.logger.critical(
|
||||
'stopping due to exception in another thread')
|
||||
break
|
||||
|
|
|
@ -37,7 +37,7 @@ from telegram.utils.webhookhandler import (WebhookServer, WebhookHandler)
|
|||
logging.getLogger(__name__).addHandler(NullHandler())
|
||||
|
||||
|
||||
class Updater:
|
||||
class Updater(object):
|
||||
"""
|
||||
This class, which employs the Dispatcher class, provides a frontend to
|
||||
telegram.Bot to the programmer, so they can focus on coding the bot. Its
|
||||
|
|
|
@ -632,7 +632,7 @@ class UpdaterTest(BaseTest, unittest.TestCase):
|
|||
self.assertRaises(ValueError, Updater)
|
||||
|
||||
|
||||
class MockBot:
|
||||
class MockBot(object):
|
||||
|
||||
def __init__(self, text, messages=1, raise_error=False,
|
||||
bootstrap_retries=None, bootstrap_err=TelegramError('test')):
|
||||
|
|
Loading…
Add table
Reference in a new issue