From 0c9b63b036c5622882534a87ed37a7c1c693fcb3 Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Fri, 15 Jun 2018 10:01:18 +0200 Subject: [PATCH] Don't print stack trace on keyboard interrupt --- toot/console.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/toot/console.py b/toot/console.py index 7328824..62b1166 100644 --- a/toot/console.py +++ b/toot/console.py @@ -385,9 +385,8 @@ def main(): try: run_command(app, user, command_name, args) - except ConsoleError as e: - print_err(str(e)) - sys.exit(1) - except ApiError as e: + except (ConsoleError, ApiError) as e: print_err(str(e)) sys.exit(1) + except KeyboardInterrupt as e: + pass