Merge pull request #240 from python-telegram-bot/os_exit

exit immediately if receiving second interrupt #224
This commit is contained in:
Leandro Toledo 2016-04-18 16:22:21 -03:00
commit b40a59f509

View file

@ -388,7 +388,12 @@ class Updater(object):
def signal_handler(self, signum, frame):
self.is_idle = False
self.stop()
if self.running:
self.stop()
else:
self.logger.warning('Exiting immediately!')
import os
os._exit(1)
def idle(self, stop_signals=(SIGINT, SIGTERM, SIGABRT)):
"""