bitbake: hob/hobeventhandler: Throw an exception if runCommand fails
authorConstantin Musca <constantinx.musca@intel.com>
Thu, 4 Oct 2012 05:15:52 +0000 (08:15 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 4 Oct 2012 13:07:52 +0000 (14:07 +0100)
- throw a Hob exception if runCommand returns 'Busy' or
'No such command'

[YOCTO #1245]

(Bitbake rev: 5a8e3baa66f845599a616f080a7efce81ecda631)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/ui/crumbs/hobeventhandler.py

index e8d7dc2..2ce5b66 100644 (file)
@@ -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()