]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
command: Treat empty messages as failures, not CommandCompleted
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 13 Sep 2013 16:33:30 +0000 (17:33 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 13 Sep 2013 16:45:37 +0000 (17:45 +0100)
Empty messages should trigger CommandFailed, not CommandCompleted as
otherwise the exit code will be incorrect.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/command.py

index 6c7b8919301196ea7f51bda5f832e2ebe97fac6e..f1abaf70d2d4c4e00945c5cd73da9199beacb84d 100644 (file)
@@ -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)