[bitbake-devel] command: Treat empty messages as failures, not CommandCompleted

Submitted by Richard Purdie on Sept. 13, 2013, 4:33 p.m.


Message ID 1379090010.3484.275.camel@ted
State New
Headers show

Commit Message

Richard Purdie Sept. 13, 2013, 4:33 p.m.
Empty messages should trigger CommandFailed, not CommandCompleted as
otherwise the exit code will be incorrect.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 6c7b891..f1abaf7 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -117,7 +117,7 @@  class Command:
             return False
     def finishAsyncCommand(self, msg=None, code=None):
-        if msg:
+        if msg or msg == "":
             bb.event.fire(CommandFailed(msg), self.cooker.event_data)
         elif code:
             bb.event.fire(CommandExit(code), self.cooker.event_data)