From: Catalin Marinas Date: Thu, 27 Oct 2005 19:47:25 +0000 (+0100) Subject: Capture the KeyboardInterrupt exception X-Git-Tag: v0.8~41 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/4d9fc826b24e49648bc976b41bbd1038f9c3f07c?ds=inline 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 --- 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)