From 955acb74b42ba0836f828d087d47a45393f6eba2 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Wed, 8 Feb 2017 14:16:04 +0100 Subject: [PATCH] Improve signal handling --- bot.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bot.py b/bot.py index 22e4dc2..99975bd 100755 --- a/bot.py +++ b/bot.py @@ -24,7 +24,5 @@ updater.dispatcher.add_handler(telegram.ext.CommandHandler("auth", auth)) updater.dispatcher.add_handler(telegram.ext.CommandHandler("unauth", unauth)) updater.dispatcher.add_handler(telegram.ext.CommandHandler("fish", fish)) -try: - updater.start_polling() -except KeyboardInterrupt: - updater.stop() +updater.start_polling() +updater.idle()