From 777eb97d8ed42f4c7432fc8ee516e4704a9989e8 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 14 Sep 2022 16:16:15 +0200 Subject: Cleanly exit on KeyboardInterrupt. --- fshare.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fshare.py') diff --git a/fshare.py b/fshare.py index 5e48e94..e1bc684 100755 --- a/fshare.py +++ b/fshare.py @@ -405,3 +405,6 @@ with contextlib.ExitStack() as stack: except StateCorruptError: logger.error('Corrupted state file') sys.exit(1) + except KeyboardInterrupt: + logger.info('Interrupted, exiting') + sys.exit(0) -- cgit v1.2.3