diff options
author | Joris | 2023-09-17 12:25:33 +0200 |
---|---|---|
committer | Joris | 2023-09-17 12:25:33 +0200 |
commit | 61abb0a9a05bec2ce2ce58e2943eb1458b6b25c3 (patch) | |
tree | 06f99a17584539305f1aed8933f32910473c4cf3 | |
parent | 1ebc55c72a1a17293bbf4ad86e0177a10a794750 (diff) |
Hide stack trace when using C-c
-rwxr-xr-x | books | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,6 +1,10 @@ #!/usr/bin/env python import cli.main import os +import sys bin_dir = os.path.dirname(os.path.realpath(__file__)) -cli.main.main(bin_dir) +try: + cli.main.main(bin_dir) +except KeyboardInterrupt: + sys.exit(1) |