diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2010-07-08 17:14:20 +0200 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2010-07-08 17:14:20 +0200 |
commit | 3eac51fa7beb8e7cae657c394c2de52f3f47ef12 (patch) | |
tree | 162baa1bab1b2376648cfdfcb8996832848480f0 | |
parent | Rename make target "release" to "dist" (diff) | |
download | overlord-3eac51fa7beb8e7cae657c394c2de52f3f47ef12.tar.gz overlord-3eac51fa7beb8e7cae657c394c2de52f3f47ef12.tar.bz2 overlord-3eac51fa7beb8e7cae657c394c2de52f3f47ef12.zip |
Catch keyboard interrupts (Ctrl+C)
-rw-r--r-- | CHANGES | 7 | ||||
-rw-r--r-- | layman/overlays/source.py | 6 |
2 files changed, 12 insertions, 1 deletions
@@ -1,6 +1,13 @@ CHANGES ------- +Version TODO +=================================== + + - Fixed: Catch keyboard interrupts (Ctrl+C) while + running child processes properly + + Version 1.4.0 - Released 2010-07-08 =================================== diff --git a/layman/overlays/source.py b/layman/overlays/source.py index 9836526..2c039c9 100644 --- a/layman/overlays/source.py +++ b/layman/overlays/source.py @@ -148,7 +148,11 @@ class OverlaySource(object): # Make child non-interactive proc.stdin.close() - result = proc.wait() + try: + result = proc.wait() + except KeyboardInterrupt: + OUT.info('Interrupted manually', 2) + result = 1 if self.quiet: output_target.close() |