summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
diff options
context:
space:
mode:
authorShane Wang <shane.wang@intel.com>2012-03-16 15:17:37 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-20 15:21:33 +0000
commit491c87d1674b0447aa2e37d67bcba3aa55eec677 (patch)
tree6ce2f3f00f6e0f3e8fb4ba1c6a3c86542226e7bf /bitbake/lib/bb/ui/crumbs/imagedetailspage.py
parent9ecdbc377c6ab6848afb0a378c5804918951f6b7 (diff)
downloadpoky-491c87d1674b0447aa2e37d67bcba3aa55eec677.tar.gz
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>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/imagedetailspage.py')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/imagedetailspage.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
index c063d74228..30c25aa5d9 100755
--- a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
+++ b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
@@ -64,9 +64,9 @@ class ImageDetailsPage (HobPage):
64 self.hbox.set_border_width(15) 64 self.hbox.set_border_width(15)
65 self.add(self.hbox) 65 self.add(self.hbox)
66 66
67 if widget != None: 67 if widget:
68 row = 1 68 row = 1
69 elif varlist != None and vallist != None: 69 elif varlist and vallist:
70 # pack the icon and the text on the left 70 # pack the icon and the text on the left
71 row = len(varlist) 71 row = len(varlist)
72 self.table = gtk.Table(row, 20, True) 72 self.table = gtk.Table(row, 20, True)
@@ -75,18 +75,18 @@ class ImageDetailsPage (HobPage):
75 75
76 colid = 0 76 colid = 0
77 self.line_widgets = {} 77 self.line_widgets = {}
78 if icon != None: 78 if icon:
79 self.table.attach(icon, colid, colid + 2, 0, 1) 79 self.table.attach(icon, colid, colid + 2, 0, 1)
80 colid = colid + 2 80 colid = colid + 2
81 if widget != None: 81 if widget:
82 self.table.attach(widget, colid, 20, 0, 1) 82 self.table.attach(widget, colid, 20, 0, 1)
83 elif varlist != None and vallist != None: 83 elif varlist and vallist:
84 for line in range(0, row): 84 for line in range(0, row):
85 self.line_widgets[varlist[line]] = self.text2label(varlist[line], vallist[line]) 85 self.line_widgets[varlist[line]] = self.text2label(varlist[line], vallist[line])
86 self.table.attach(self.line_widgets[varlist[line]], colid, 20, line, line + 1) 86 self.table.attach(self.line_widgets[varlist[line]], colid, 20, line, line + 1)
87 87
88 # pack the button on the right 88 # pack the button on the right
89 if button != None: 89 if button:
90 self.hbox.pack_end(button, expand=False, fill=False) 90 self.hbox.pack_end(button, expand=False, fill=False)
91 91
92 def update_line_widgets(self, variable, value): 92 def update_line_widgets(self, variable, value):