From f49336398f7cd227b11a873954bf89967c84502a Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Tue, 11 Nov 2008 16:47:58 +0000 Subject: Handle keyboard interruputs There is no need to spit out a traceback for it. --- RepSys/command.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RepSys/command.py b/RepSys/command.py index 1833bcd..f1d61f7 100644 --- a/RepSys/command.py +++ b/RepSys/command.py @@ -40,6 +40,10 @@ def do_command(parse_options_func, main_func): except Error, e: sys.stderr.write("error: %s\n" % str(e)) sys.exit(1) + except KeyboardInterrupt: + sys.stderr.write("interrupted\n") + sys.stderr.flush() + sys.exit(1) def default_parent(url): if url.find("://") == -1: -- cgit v1.2.1