From 61abb0a9a05bec2ce2ce58e2943eb1458b6b25c3 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 17 Sep 2023 12:25:33 +0200 Subject: Hide stack trace when using C-c --- books | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/books b/books index dbdc846..5ddbe71 100755 --- a/books +++ b/books @@ -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) -- cgit v1.2.3