mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
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:
committed by
Richard Purdie
parent
9ecdbc377c
commit
491c87d167
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user