From 895ee050b26bef8c17b06679036f6a0e44096c71 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Wed, 12 Jun 2013 09:52:42 -0500 Subject: Client: Exit when ^C is pressed interactively Signed-off-by: Sol Jerome --- src/lib/Bcfg2/Client/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/lib/Bcfg2/Client/__init__.py') diff --git a/src/lib/Bcfg2/Client/__init__.py b/src/lib/Bcfg2/Client/__init__.py index 3bc261f2f..25603186e 100644 --- a/src/lib/Bcfg2/Client/__init__.py +++ b/src/lib/Bcfg2/Client/__init__.py @@ -22,8 +22,5 @@ def prompt(msg): ans = input(msg) return ans in ['y', 'Y'] except EOFError: - # python 2.4.3 on CentOS doesn't like ^C for some reason - return False - except: - print("Error while reading input: %s" % sys.exc_info()[1]) - return False + # handle ^C on rhel-based platforms + raise SystemExit(1) -- cgit v1.2.3-1-g7c22