diff options
author | Constantin Musca <constantinx.musca@intel.com> | 2012-10-04 08:15:52 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-04 13:59:50 +0100 |
commit | 5a8e3baa66f845599a616f080a7efce81ecda631 (patch) | |
tree | 3fa02fa08d6791f71067afbc3937e13e61ffc2d4 | |
parent | 001b1c439ffa450cb8728b0fa9469fed63ae9bed (diff) | |
download | bitbake-5a8e3baa66f845599a616f080a7efce81ecda631.tar.gz |
hob/hobeventhandler: Throw an exception if runCommand fails
- throw a Hob exception if runCommand returns 'Busy' or
'No such command'
[YOCTO #1245]
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/ui/crumbs/hobeventhandler.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py index e8d7dc2ce..2ce5b66e7 100644 --- a/lib/bb/ui/crumbs/hobeventhandler.py +++ b/lib/bb/ui/crumbs/hobeventhandler.py @@ -101,7 +101,12 @@ class HobHandler(gobject.GObject): def runCommand(self, commandline): try: - return self.server.runCommand(commandline) + result = self.server.runCommand(commandline) + result_str = str(result) + if (result_str.startswith("Busy (") or + result_str == "No such command"): + raise Exception(result_str) + return result except Exception as e: self.commands_async = [] self.clear_busy() |