summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-10 10:21:41 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:36 +0100
commitef835bf33a9c5bddb5b3c7951178f86ed29a37f4 (patch)
tree9f2e8a6d0daa133d0bc7f564ca27f99166949c9f /bitbake
parent562fd5f2a72f8e4925bf2f14cb5fbd015c591b4f (diff)
downloadpoky-ef835bf33a9c5bddb5b3c7951178f86ed29a37f4.tar.gz
Handle SystemExit and KeyboardInterrupt sanely when executing a command
(Bitbake rev: 17f40d036814e4abf6d87363fff7823c8c85c298) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/command.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index a590e61abe..32d5b5bab6 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -89,7 +89,16 @@ class Command:
89 return False 89 return False
90 else: 90 else:
91 return False 91 return False
92 except: 92 except KeyboardInterrupt as exc:
93 self.finishAsyncCommand("Interrupted")
94 return False
95 except SystemExit as exc:
96 arg = exc.args[0]
97 if isinstance(arg, basestring):
98 self.finishAsyncCommand(arg)
99 else:
100 self.finishAsyncCommand("Exited with %s" % arg)
101 except Exception:
93 import traceback 102 import traceback
94 self.finishAsyncCommand(traceback.format_exc()) 103 self.finishAsyncCommand(traceback.format_exc())
95 return False 104 return False