From patchwork Wed Mar 21 12:55:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel, 01/17] Hob: Still use initcmd != None as the if judgement Date: Wed, 21 Mar 2012 12:55:05 -0000 From: Dongxiao Xu X-Patchwork-Id: 23977 Message-Id: <450bb9ebc7674fc22a5d92268a4c3049c9ec2c11.1332334068.git.dongxiao.xu@intel.com> To: bitbake-devel@lists.openembedded.org 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 --- lib/bb/ui/crumbs/hobeventhandler.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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