diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-09-14 16:16:15 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-09-14 16:16:15 +0200 |
commit | 777eb97d8ed42f4c7432fc8ee516e4704a9989e8 (patch) | |
tree | 1d99e061a6d25a1c12a7c0815266a988b0ed5915 | |
parent | 2e5e247801a313603894529d0b44ca40f04d931e (diff) |
Cleanly exit on KeyboardInterrupt.
-rwxr-xr-x | fshare.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) |