summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2013-06-12 09:52:42 -0500
committerSol Jerome <sol.jerome@gmail.com>2013-06-12 09:52:42 -0500
commit895ee050b26bef8c17b06679036f6a0e44096c71 (patch)
tree1eeec2177492e484c4ed2c9c9e4ec71842f24a90 /src/lib
parent2907481679db553bedfe076cb9dbcb83d011695b (diff)
downloadbcfg2-895ee050b26bef8c17b06679036f6a0e44096c71.tar.gz
bcfg2-895ee050b26bef8c17b06679036f6a0e44096c71.tar.bz2
bcfg2-895ee050b26bef8c17b06679036f6a0e44096c71.zip
Client: Exit when ^C is pressed interactively
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Bcfg2/Client/__init__.py7
1 files changed, 2 insertions, 5 deletions
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)