diff --git a/telegram/dispatcher.py b/telegram/dispatcher.py index 83e25f182..2e31d0dbe 100644 --- a/telegram/dispatcher.py +++ b/telegram/dispatcher.py @@ -182,10 +182,11 @@ class Dispatcher: # Dispatch any errors except TelegramError as te: - self.logger.warn("Error was raised while processing Update.") + self.logger.warn("Error was raised while processing " + "Update.") self.dispatchError(update, te) - # All other errors should not stop the thread, so just print them + # All other errors should not stop the thread, just print them except: print_exc() else: diff --git a/telegram/updater.py b/telegram/updater.py index 652ddf259..0014e7764 100644 --- a/telegram/updater.py +++ b/telegram/updater.py @@ -105,9 +105,10 @@ class Updater: dispatcher_thread = Thread(target=self.dispatcher.start, name="dispatcher") updater_thread = Thread(target=self._start_polling, - name="updater", - args=(poll_interval, timeout, - network_delay)) + name="updater", + args=(poll_interval, + timeout, + network_delay)) # Start threads dispatcher_thread.start() @@ -148,8 +149,12 @@ class Updater: dispatcher_thread = Thread(target=self.dispatcher.start, name="dispatcher") updater_thread = Thread(target=self._start_webhook, - name="updater", - args=(listen, port, url_path, cert, key)) + name="updater", + args=(listen, + port, + url_path, + cert, + key)) # Start threads dispatcher_thread.start()