Hob: fix '!= None' and '== None' in the code

This patch is to fix the following:

if foo != None -----> if foo
if foo == None -----> if not foo

(From Poky rev: d771343b1726f166ed8d75543ba68bd2a20aee7b)

(Bitbake rev: 23c140a4d00293d922cbd34b6b837493cac2e93a)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Shane Wang
2012-03-16 15:17:37 +08:00
committed by Richard Purdie
parent 9ecdbc377c
commit 491c87d167
6 changed files with 16 additions and 16 deletions

View File

@@ -366,7 +366,7 @@ class HobTabBar(gtk.DrawingArea):
child["x"] = self.tab_x + i * self.tab_width
child["y"] = self.tab_y
if self.blank_rectangle != None:
if self.blank_rectangle:
self.resize_blank_rectangle()
def resize_blank_rectangle(self):
@@ -553,7 +553,7 @@ class HobTabBar(gtk.DrawingArea):
self.queue_draw()
def set_blank_size(self, x, y, w, h):
if self.blank_rectangle == None or self.blank_rectangle.x != x or self.blank_rectangle.width != w:
if not self.blank_rectangle or self.blank_rectangle.x != x or self.blank_rectangle.width != w:
self.emit("blank-area-changed", x, y, w, h)
return gtk.gdk.Rectangle(x, y, w, h)
@@ -640,7 +640,7 @@ class HobNotebook(gtk.VBox):
if not notebook:
return
title = notebook.get_tab_label_text(notebook_child)
if title == None:
if not title:
return
for child in self.tabbar.children:
if child["title"] == title: