mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
0ac5174c7d
commit
fa5524890e
@@ -1204,7 +1204,7 @@ class BBCooker:
|
||||
for c in collection_list:
|
||||
calc_layer_priority(c)
|
||||
regex = self.data.getVar("BBFILE_PATTERN_%s" % c)
|
||||
if regex == None:
|
||||
if regex is None:
|
||||
parselog.error("BBFILE_PATTERN_%s not defined" % c)
|
||||
errors = True
|
||||
continue
|
||||
@@ -1310,7 +1310,7 @@ class BBCooker:
|
||||
self.parseConfiguration()
|
||||
|
||||
# If we are told to do the None task then query the default task
|
||||
if (task == None):
|
||||
if task is None:
|
||||
task = self.configuration.cmd
|
||||
if not task.startswith("do_"):
|
||||
task = "do_%s" % task
|
||||
@@ -1454,7 +1454,7 @@ class BBCooker:
|
||||
self.buildSetVars()
|
||||
|
||||
# If we are told to do the None task then query the default task
|
||||
if (task == None):
|
||||
if task is None:
|
||||
task = self.configuration.cmd
|
||||
|
||||
if not task.startswith("do_"):
|
||||
@@ -1687,7 +1687,7 @@ class CookerCollectFiles(object):
|
||||
def calc_bbfile_priority( self, filename, matched = None ):
|
||||
for _, _, regex, pri in self.bbfile_config_priorities:
|
||||
if regex.match(filename):
|
||||
if matched != None:
|
||||
if matched is not None:
|
||||
if not regex in matched:
|
||||
matched.add(regex)
|
||||
return pri
|
||||
|
||||
Reference in New Issue
Block a user