Patchwork [bitbake-devel,01/17] Hob: Still use initcmd != None as the if judgement

login
register
mail settings
Submitter Dongxiao Xu
Date March 21, 2012, 12:55 p.m.
Message ID <450bb9ebc7674fc22a5d92268a4c3049c9ec2c11.1332334068.git.dongxiao.xu@intel.com>
Download mbox | patch
Permalink /patch/23977/
State Accepted
Commit ee55ca82c94080ef825d6de094e38ba40ee62e8b
Headers show

Comments

Dongxiao Xu - March 21, 2012, 12:55 p.m.
This commit reverts part of change in 491c87d1, since initcmd has a
possible value of 0, therefore we must explicitly compare the initcmd
with None in if judgement.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/hobeventhandler.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 71df81c..e24c340 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -119,7 +119,7 @@  class HobHandler(gobject.GObject):
             self.generating = False
 
     def run_next_command(self, initcmd=None):
-        if initcmd:
+        if initcmd != None:
             self.initcmd = initcmd
 
         if self.commands_async:
@@ -127,7 +127,7 @@  class HobHandler(gobject.GObject):
             next_command = self.commands_async.pop(0)
         else:
             self.clear_busy()
-            if self.initcmd:
+            if self.initcmd != None:
                 self.emit("command-succeeded", self.initcmd)
             return