aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris2023-09-17 12:25:33 +0200
committerJoris2023-09-17 12:25:33 +0200
commit61abb0a9a05bec2ce2ce58e2943eb1458b6b25c3 (patch)
tree06f99a17584539305f1aed8933f32910473c4cf3
parent1ebc55c72a1a17293bbf4ad86e0177a10a794750 (diff)
downloadbooks-61abb0a9a05bec2ce2ce58e2943eb1458b6b25c3.tar.gz
books-61abb0a9a05bec2ce2ce58e2943eb1458b6b25c3.tar.bz2
books-61abb0a9a05bec2ce2ce58e2943eb1458b6b25c3.zip
Hide stack trace when using C-c
-rwxr-xr-xbooks6
1 files changed, 5 insertions, 1 deletions
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)