From 61da2bd079984ac1a1f25b6e718a48f8a7f986b1 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Mon, 25 Nov 2019 22:53:05 +0300 Subject: [PATCH] fix unhandled keyboardinterrupt --- bots/management/commands/periodic_bots.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bots/management/commands/periodic_bots.py b/bots/management/commands/periodic_bots.py index 464ef9c..764ff55 100644 --- a/bots/management/commands/periodic_bots.py +++ b/bots/management/commands/periodic_bots.py @@ -18,4 +18,7 @@ class Command(BaseCommand): except Exception as e: sentry_sdk.capture_exception(e) traceback.print_exc() - sleep(5) + try: + sleep(5) + except KeyboardInterrupt: + return