Skip to contentSkip to conversation

command: Treat empty messages as failures, not CommandCompleted

PATCH New Richard Purdie 1 participant 1 message Sep 13, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 command: Treat empty messages as failures, not CommandCompleted

Empty messages should trigger CommandFailed, not CommandCompleted as otherwise the exit code will be incorrect.

---

bitbake/lib/bb/command.py +1 -1
index 6c7b891..f1abaf7 100644
@@ -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)