Merge remote-tracking branch 'upstream/master' into bot-api-2.0

This commit is contained in:
Leandro Toledo 2016-04-16 13:16:49 -03:00
commit 15cc410c10
3 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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')):