From 4d9fc826b24e49648bc976b41bbd1038f9c3f07c Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Thu, 27 Oct 2005 20:47:25 +0100 Subject: [PATCH] Capture the KeyboardInterrupt exception This is to avoid a stack back-trace when a command is interrupted by the user. Signed-off-by: Catalin Marinas --- stgit/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stgit/main.py b/stgit/main.py index 0a06b00..5fba58c 100644 --- a/stgit/main.py +++ b/stgit/main.py @@ -164,5 +164,7 @@ def main(): err: print >> sys.stderr, '%s %s: %s' % (prog, cmd, err) sys.exit(2) + except KeyboardInterrupt: + sys.exit(1) sys.exit(0) -- 2.11.0