summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorFrazer Clews <frazer.clews@codethink.co.uk>2020-01-16 17:11:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-19 13:31:05 +0000
commitfa5524890e86d353ee7d2194ccdd6c84e9bd2d31 (patch)
treef3d46ddbd5dd2b772a727b04303bb97b8ae43b9b /bitbake/lib/bb
parent0ac5174c7d39a3e49893df0d517d47bec1935555 (diff)
downloadpoky-fa5524890e86d353ee7d2194ccdd6c84e9bd2d31.tar.gz
bitbake: lib: amend code to use proper singleton comparisons where possible
amend the code to handle singleton comparisons properly so it only checks if they only refer to the same object or not, and not bother comparing the values. (Bitbake rev: b809a6812aa15a8a9af97bc382cc4b19571e6bfc) Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/command.py2
-rw-r--r--bitbake/lib/bb/cooker.py8
-rw-r--r--bitbake/lib/bb/data.py2
-rw-r--r--bitbake/lib/bb/event.py2
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py4
-rw-r--r--bitbake/lib/bb/fetch2/git.py2
-rw-r--r--bitbake/lib/bb/fetch2/osc.py2
-rw-r--r--bitbake/lib/bb/fetch2/perforce.py2
-rw-r--r--bitbake/lib/bb/fetch2/ssh.py2
-rw-r--r--bitbake/lib/bb/parse/ast.py20
-rw-r--r--bitbake/lib/bb/providers.py6
-rw-r--r--bitbake/lib/bb/taskdata.py2
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py8
-rw-r--r--bitbake/lib/bb/ui/knotty.py2
-rw-r--r--bitbake/lib/bb/ui/ncurses.py2
-rw-r--r--bitbake/lib/bb/ui/taskexp.py2
-rw-r--r--bitbake/lib/bb/ui/toasterui.py2
-rw-r--r--bitbake/lib/bb/ui/uievent.py2
18 files changed, 36 insertions, 36 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 378f389b3a..c8e1352865 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -65,7 +65,7 @@ class Command:
65 # Can run synchronous commands straight away 65 # Can run synchronous commands straight away
66 command_method = getattr(self.cmds_sync, command) 66 command_method = getattr(self.cmds_sync, command)
67 if ro_only: 67 if ro_only:
68 if not hasattr(command_method, 'readonly') or False == getattr(command_method, 'readonly'): 68 if not hasattr(command_method, 'readonly') or not getattr(command_method, 'readonly'):
69 return None, "Not able to execute not readonly commands in readonly mode" 69 return None, "Not able to execute not readonly commands in readonly mode"
70 try: 70 try:
71 self.cooker.process_inotify_updates() 71 self.cooker.process_inotify_updates()
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 3d65b0cb74..8407db8b00 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1204,7 +1204,7 @@ class BBCooker:
1204 for c in collection_list: 1204 for c in collection_list:
1205 calc_layer_priority(c) 1205 calc_layer_priority(c)
1206 regex = self.data.getVar("BBFILE_PATTERN_%s" % c) 1206 regex = self.data.getVar("BBFILE_PATTERN_%s" % c)
1207 if regex == None: 1207 if regex is None:
1208 parselog.error("BBFILE_PATTERN_%s not defined" % c) 1208 parselog.error("BBFILE_PATTERN_%s not defined" % c)
1209 errors = True 1209 errors = True
1210 continue 1210 continue
@@ -1310,7 +1310,7 @@ class BBCooker:
1310 self.parseConfiguration() 1310 self.parseConfiguration()
1311 1311
1312 # If we are told to do the None task then query the default task 1312 # If we are told to do the None task then query the default task
1313 if (task == None): 1313 if task is None:
1314 task = self.configuration.cmd 1314 task = self.configuration.cmd
1315 if not task.startswith("do_"): 1315 if not task.startswith("do_"):
1316 task = "do_%s" % task 1316 task = "do_%s" % task
@@ -1454,7 +1454,7 @@ class BBCooker:
1454 self.buildSetVars() 1454 self.buildSetVars()
1455 1455
1456 # If we are told to do the None task then query the default task 1456 # If we are told to do the None task then query the default task
1457 if (task == None): 1457 if task is None:
1458 task = self.configuration.cmd 1458 task = self.configuration.cmd
1459 1459
1460 if not task.startswith("do_"): 1460 if not task.startswith("do_"):
@@ -1687,7 +1687,7 @@ class CookerCollectFiles(object):
1687 def calc_bbfile_priority( self, filename, matched = None ): 1687 def calc_bbfile_priority( self, filename, matched = None ):
1688 for _, _, regex, pri in self.bbfile_config_priorities: 1688 for _, _, regex, pri in self.bbfile_config_priorities:
1689 if regex.match(filename): 1689 if regex.match(filename):
1690 if matched != None: 1690 if matched is not None:
1691 if not regex in matched: 1691 if not regex in matched:
1692 matched.add(regex) 1692 matched.add(regex)
1693 return pri 1693 return pri
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 0d75d0c1a9..6dc02172cb 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -79,7 +79,7 @@ def expand(s, d, varname = None):
79 return d.expand(s, varname) 79 return d.expand(s, varname)
80 80
81def expandKeys(alterdata, readdata = None): 81def expandKeys(alterdata, readdata = None):
82 if readdata == None: 82 if readdata is None:
83 readdata = alterdata 83 readdata = alterdata
84 84
85 todolist = {} 85 todolist = {}
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index 42143e7407..5cfbf36126 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -346,7 +346,7 @@ def set_UIHmask(handlerNum, level, debug_domains, mask):
346 346
347def getName(e): 347def getName(e):
348 """Returns the name of a class or class instance""" 348 """Returns the name of a class or class instance"""
349 if getattr(e, "__name__", None) == None: 349 if getattr(e, "__name__", None) is None:
350 return e.__class__.__name__ 350 return e.__class__.__name__
351 else: 351 else:
352 return e.__name__ 352 return e.__name__
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 731c160892..18a6819d5d 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1081,7 +1081,7 @@ def try_mirrors(fetch, d, origud, mirrors, check = False):
1081 1081
1082 for index, uri in enumerate(uris): 1082 for index, uri in enumerate(uris):
1083 ret = try_mirror_url(fetch, origud, uds[index], ld, check) 1083 ret = try_mirror_url(fetch, origud, uds[index], ld, check)
1084 if ret != False: 1084 if ret:
1085 return ret 1085 return ret
1086 return None 1086 return None
1087 1087
@@ -1351,7 +1351,7 @@ class FetchMethod(object):
1351 """ 1351 """
1352 1352
1353 # We cannot compute checksums for directories 1353 # We cannot compute checksums for directories
1354 if os.path.isdir(urldata.localpath) == True: 1354 if os.path.isdir(urldata.localpath):
1355 return False 1355 return False
1356 if urldata.localpath.find("*") != -1: 1356 if urldata.localpath.find("*") != -1:
1357 return False 1357 return False
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index fa41b078f1..fe0a384af2 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -671,7 +671,7 @@ class Git(FetchMethod):
671 671
672 # search for version in the line 672 # search for version in the line
673 tag = tagregex.search(tag_head) 673 tag = tagregex.search(tag_head)
674 if tag == None: 674 if tag is None:
675 continue 675 continue
676 676
677 tag = tag.group('pver') 677 tag = tag.group('pver')
diff --git a/bitbake/lib/bb/fetch2/osc.py b/bitbake/lib/bb/fetch2/osc.py
index f55db6f791..8f091efd02 100644
--- a/bitbake/lib/bb/fetch2/osc.py
+++ b/bitbake/lib/bb/fetch2/osc.py
@@ -41,7 +41,7 @@ class Osc(FetchMethod):
41 else: 41 else:
42 pv = d.getVar("PV", False) 42 pv = d.getVar("PV", False)
43 rev = bb.fetch2.srcrev_internal_helper(ud, d) 43 rev = bb.fetch2.srcrev_internal_helper(ud, d)
44 if rev and rev != True: 44 if rev:
45 ud.revision = rev 45 ud.revision = rev
46 else: 46 else:
47 ud.revision = "" 47 ud.revision = ""
diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py
index b2ac11ecab..f57c2a4f52 100644
--- a/bitbake/lib/bb/fetch2/perforce.py
+++ b/bitbake/lib/bb/fetch2/perforce.py
@@ -104,7 +104,7 @@ class Perforce(FetchMethod):
104 if command == 'changes': 104 if command == 'changes':
105 p4cmd = '%s%s changes -m 1 //%s' % (ud.basecmd, p4opt, pathnrev) 105 p4cmd = '%s%s changes -m 1 //%s' % (ud.basecmd, p4opt, pathnrev)
106 elif command == 'print': 106 elif command == 'print':
107 if depot_filename != None: 107 if depot_filename is not None:
108 p4cmd = '%s%s print -o "p4/%s" "%s"' % (ud.basecmd, p4opt, filename, depot_filename) 108 p4cmd = '%s%s print -o "p4/%s" "%s"' % (ud.basecmd, p4opt, filename, depot_filename)
109 else: 109 else:
110 raise FetchError('No depot file name provided to p4 %s' % command, ud.url) 110 raise FetchError('No depot file name provided to p4 %s' % command, ud.url)
diff --git a/bitbake/lib/bb/fetch2/ssh.py b/bitbake/lib/bb/fetch2/ssh.py
index 34debe399b..5e982ecf38 100644
--- a/bitbake/lib/bb/fetch2/ssh.py
+++ b/bitbake/lib/bb/fetch2/ssh.py
@@ -58,7 +58,7 @@ class SSH(FetchMethod):
58 '''Class to fetch a module or modules via Secure Shell''' 58 '''Class to fetch a module or modules via Secure Shell'''
59 59
60 def supports(self, urldata, d): 60 def supports(self, urldata, d):
61 return __pattern__.match(urldata.url) != None 61 return __pattern__.match(urldata.url) is not None
62 62
63 def supports_checksum(self, urldata): 63 def supports_checksum(self, urldata):
64 return False 64 return False
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index 362c1a39ce..eb8cfa21b8 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -89,7 +89,7 @@ class DataNode(AstNode):
89 self.groupd = groupd 89 self.groupd = groupd
90 90
91 def getFunc(self, key, data): 91 def getFunc(self, key, data):
92 if 'flag' in self.groupd and self.groupd['flag'] != None: 92 if 'flag' in self.groupd and self.groupd['flag'] is not None:
93 return data.getVarFlag(key, self.groupd['flag'], expand=False, noweakdefault=True) 93 return data.getVarFlag(key, self.groupd['flag'], expand=False, noweakdefault=True)
94 else: 94 else:
95 return data.getVar(key, False, noweakdefault=True, parsing=True) 95 return data.getVar(key, False, noweakdefault=True, parsing=True)
@@ -102,36 +102,36 @@ class DataNode(AstNode):
102 'file': self.filename, 102 'file': self.filename,
103 'line': self.lineno, 103 'line': self.lineno,
104 } 104 }
105 if "exp" in groupd and groupd["exp"] != None: 105 if "exp" in groupd and groupd["exp"] is not None:
106 data.setVarFlag(key, "export", 1, op = 'exported', **loginfo) 106 data.setVarFlag(key, "export", 1, op = 'exported', **loginfo)
107 107
108 op = "set" 108 op = "set"
109 if "ques" in groupd and groupd["ques"] != None: 109 if "ques" in groupd and groupd["ques"] is not None:
110 val = self.getFunc(key, data) 110 val = self.getFunc(key, data)
111 op = "set?" 111 op = "set?"
112 if val == None: 112 if val is None:
113 val = groupd["value"] 113 val = groupd["value"]
114 elif "colon" in groupd and groupd["colon"] != None: 114 elif "colon" in groupd and groupd["colon"] is not None:
115 e = data.createCopy() 115 e = data.createCopy()
116 op = "immediate" 116 op = "immediate"
117 val = e.expand(groupd["value"], key + "[:=]") 117 val = e.expand(groupd["value"], key + "[:=]")
118 elif "append" in groupd and groupd["append"] != None: 118 elif "append" in groupd and groupd["append"] is not None:
119 op = "append" 119 op = "append"
120 val = "%s %s" % ((self.getFunc(key, data) or ""), groupd["value"]) 120 val = "%s %s" % ((self.getFunc(key, data) or ""), groupd["value"])
121 elif "prepend" in groupd and groupd["prepend"] != None: 121 elif "prepend" in groupd and groupd["prepend"] is not None:
122 op = "prepend" 122 op = "prepend"
123 val = "%s %s" % (groupd["value"], (self.getFunc(key, data) or "")) 123 val = "%s %s" % (groupd["value"], (self.getFunc(key, data) or ""))
124 elif "postdot" in groupd and groupd["postdot"] != None: 124 elif "postdot" in groupd and groupd["postdot"] is not None:
125 op = "postdot" 125 op = "postdot"
126 val = "%s%s" % ((self.getFunc(key, data) or ""), groupd["value"]) 126 val = "%s%s" % ((self.getFunc(key, data) or ""), groupd["value"])
127 elif "predot" in groupd and groupd["predot"] != None: 127 elif "predot" in groupd and groupd["predot"] is not None:
128 op = "predot" 128 op = "predot"
129 val = "%s%s" % (groupd["value"], (self.getFunc(key, data) or "")) 129 val = "%s%s" % (groupd["value"], (self.getFunc(key, data) or ""))
130 else: 130 else:
131 val = groupd["value"] 131 val = groupd["value"]
132 132
133 flag = None 133 flag = None
134 if 'flag' in groupd and groupd['flag'] != None: 134 if 'flag' in groupd and groupd['flag'] is not None:
135 flag = groupd['flag'] 135 flag = groupd['flag']
136 elif groupd["lazyques"]: 136 elif groupd["lazyques"]:
137 flag = "_defaultval" 137 flag = "_defaultval"
diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py
index f80963cb40..81459c36d5 100644
--- a/bitbake/lib/bb/providers.py
+++ b/bitbake/lib/bb/providers.py
@@ -92,11 +92,11 @@ def preferredVersionMatch(pe, pv, pr, preferred_e, preferred_v, preferred_r):
92 Check if the version pe,pv,pr is the preferred one. 92 Check if the version pe,pv,pr is the preferred one.
93 If there is preferred version defined and ends with '%', then pv has to start with that version after removing the '%' 93 If there is preferred version defined and ends with '%', then pv has to start with that version after removing the '%'
94 """ 94 """
95 if (pr == preferred_r or preferred_r == None): 95 if pr == preferred_r or preferred_r is None:
96 if (pe == preferred_e or preferred_e == None): 96 if pe == preferred_e or preferred_e is None:
97 if preferred_v == pv: 97 if preferred_v == pv:
98 return True 98 return True
99 if preferred_v != None and preferred_v.endswith('%') and pv.startswith(preferred_v[:len(preferred_v)-1]): 99 if preferred_v is not None and preferred_v.endswith('%') and pv.startswith(preferred_v[:len(preferred_v)-1]):
100 return True 100 return True
101 return False 101 return False
102 102
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index 8c25e09e8a..d13a124983 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -362,7 +362,7 @@ class TaskData:
362 bb.event.fire(bb.event.NoProvider(item, dependees=self.get_dependees(item), reasons=["No eligible PROVIDERs exist for '%s'" % item]), cfgData) 362 bb.event.fire(bb.event.NoProvider(item, dependees=self.get_dependees(item), reasons=["No eligible PROVIDERs exist for '%s'" % item]), cfgData)
363 raise bb.providers.NoProvider(item) 363 raise bb.providers.NoProvider(item)
364 364
365 if len(eligible) > 1 and foundUnique == False: 365 if len(eligible) > 1 and not foundUnique:
366 if item not in self.consider_msgs_cache: 366 if item not in self.consider_msgs_cache:
367 providers_list = [] 367 providers_list = []
368 for fn in eligible: 368 for fn in eligible:
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 5cbca97f3f..82c62e3324 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -935,7 +935,7 @@ class BuildInfoHelper(object):
935 935
936 # only reset the build name if the one on the server is actually 936 # only reset the build name if the one on the server is actually
937 # a valid value for the build_name field 937 # a valid value for the build_name field
938 if build_name != None: 938 if build_name is not None:
939 build_info['build_name'] = build_name 939 build_info['build_name'] = build_name
940 changed = True 940 changed = True
941 941
@@ -1194,7 +1194,7 @@ class BuildInfoHelper(object):
1194 evdata = BuildInfoHelper._get_data_from_event(event) 1194 evdata = BuildInfoHelper._get_data_from_event(event)
1195 1195
1196 for t in self.internal_state['targets']: 1196 for t in self.internal_state['targets']:
1197 if t.is_image == True: 1197 if t.is_image:
1198 output_files = list(evdata.keys()) 1198 output_files = list(evdata.keys())
1199 for output in output_files: 1199 for output in output_files:
1200 if t.target in output and 'rootfs' in output and not output.endswith(".manifest"): 1200 if t.target in output and 'rootfs' in output and not output.endswith(".manifest"):
@@ -1236,7 +1236,7 @@ class BuildInfoHelper(object):
1236 task_information['outcome'] = Task.OUTCOME_PREBUILT 1236 task_information['outcome'] = Task.OUTCOME_PREBUILT
1237 else: 1237 else:
1238 task_information['task_executed'] = True 1238 task_information['task_executed'] = True
1239 if 'noexec' in vars(event) and event.noexec == True: 1239 if 'noexec' in vars(event) and event.noexec:
1240 task_information['task_executed'] = False 1240 task_information['task_executed'] = False
1241 task_information['outcome'] = Task.OUTCOME_EMPTY 1241 task_information['outcome'] = Task.OUTCOME_EMPTY
1242 task_information['script_type'] = Task.CODING_NA 1242 task_information['script_type'] = Task.CODING_NA
@@ -1776,7 +1776,7 @@ class BuildInfoHelper(object):
1776 image_file_extensions_unique = {} 1776 image_file_extensions_unique = {}
1777 image_fstypes = self.server.runCommand( 1777 image_fstypes = self.server.runCommand(
1778 ['getVariable', 'IMAGE_FSTYPES'])[0] 1778 ['getVariable', 'IMAGE_FSTYPES'])[0]
1779 if image_fstypes != None: 1779 if image_fstypes is not None:
1780 image_types_str = image_fstypes.strip() 1780 image_types_str = image_fstypes.strip()
1781 image_file_extensions = re.sub(r' {2,}', ' ', image_types_str) 1781 image_file_extensions = re.sub(r' {2,}', ' ', image_types_str)
1782 image_file_extensions_unique = set(image_file_extensions.split(' ')) 1782 image_file_extensions_unique = set(image_file_extensions.split(' '))
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 19008a4ead..a0340dfc20 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -447,7 +447,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
447 if error: 447 if error:
448 logger.error("Command '%s' failed: %s" % (cmdline, error)) 448 logger.error("Command '%s' failed: %s" % (cmdline, error))
449 return 1 449 return 1
450 elif ret != True: 450 elif not ret:
451 logger.error("Command '%s' failed: returned %s" % (cmdline, ret)) 451 logger.error("Command '%s' failed: returned %s" % (cmdline, ret))
452 return 1 452 return 1
453 453
diff --git a/bitbake/lib/bb/ui/ncurses.py b/bitbake/lib/bb/ui/ncurses.py
index 49569e375b..da4fbeabb6 100644
--- a/bitbake/lib/bb/ui/ncurses.py
+++ b/bitbake/lib/bb/ui/ncurses.py
@@ -238,7 +238,7 @@ class NCursesUI:
238 if error: 238 if error:
239 print("Error running command '%s': %s" % (cmdline, error)) 239 print("Error running command '%s': %s" % (cmdline, error))
240 return 240 return
241 elif ret != True: 241 elif not ret:
242 print("Couldn't get default commandlind! %s" % ret) 242 print("Couldn't get default commandlind! %s" % ret)
243 return 243 return
244 except xmlrpc.client.Fault as x: 244 except xmlrpc.client.Fault as x:
diff --git a/bitbake/lib/bb/ui/taskexp.py b/bitbake/lib/bb/ui/taskexp.py
index 7895102b95..8fff244235 100644
--- a/bitbake/lib/bb/ui/taskexp.py
+++ b/bitbake/lib/bb/ui/taskexp.py
@@ -200,7 +200,7 @@ def main(server, eventHandler, params):
200 if error: 200 if error:
201 print("Error running command '%s': %s" % (cmdline, error)) 201 print("Error running command '%s': %s" % (cmdline, error))
202 return 1 202 return 1
203 elif ret != True: 203 elif not ret:
204 print("Error running command '%s': returned %s" % (cmdline, ret)) 204 print("Error running command '%s': returned %s" % (cmdline, ret))
205 return 1 205 return 1
206 except client.Fault as x: 206 except client.Fault as x:
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index 51892c9a09..9260f5d9d7 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -176,7 +176,7 @@ def main(server, eventHandler, params):
176 if error: 176 if error:
177 logger.error("Command '%s' failed: %s" % (cmdline, error)) 177 logger.error("Command '%s' failed: %s" % (cmdline, error))
178 return 1 178 return 1
179 elif ret != True: 179 elif not ret:
180 logger.error("Command '%s' failed: returned %s" % (cmdline, ret)) 180 logger.error("Command '%s' failed: returned %s" % (cmdline, ret))
181 return 1 181 return 1
182 182
diff --git a/bitbake/lib/bb/ui/uievent.py b/bitbake/lib/bb/ui/uievent.py
index fedb05064d..13d0d4a04c 100644
--- a/bitbake/lib/bb/ui/uievent.py
+++ b/bitbake/lib/bb/ui/uievent.py
@@ -46,7 +46,7 @@ class BBUIEventQueue:
46 self.EventHandle = ret 46 self.EventHandle = ret
47 error = "" 47 error = ""
48 48
49 if self.EventHandle != None: 49 if self.EventHandle is not None:
50 break 50 break
51 51
52 errmsg = "Could not register UI event handler. Error: %s, host %s, "\ 52 errmsg = "Could not register UI event handler. Error: %s, host %s, "\