mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-15 17:14:21 +00:00
fix(sptool): operators "is/is not" in sp_mk_gen.py
Replace the "is/is not" operator by "==/!=" for literals, to fix the syntax warnings below: tools/sptool/sp_mk_generator.py:93: SyntaxWarning: "is not" with a literal. Did you mean "!="? return len(sppkg_rule) is not 0 tools/sptool/sp_mk_generator.py:203: SyntaxWarning: "is" with a literal. Did you mean "=="? assert(len(uuid_lines) is 1) Signed-off-by: J-Alves <joao.alves@arm.com> Change-Id: I10800f6b607942542aa2cbaaecac86b854f6b56a
This commit is contained in:
parent
c19116dd61
commit
1a28f290b8
1 changed files with 2 additions and 2 deletions
|
@ -90,7 +90,7 @@ def get_sp_pkg(sp, args :dict):
|
|||
def is_line_in_sp_gen(line, args :dict):
|
||||
with open(args["sp_gen_mk"], "r") as f:
|
||||
sppkg_rule = [l for l in f if line in l]
|
||||
return len(sppkg_rule) is not 0
|
||||
return len(sppkg_rule) != 0
|
||||
|
||||
def get_file_from_layout(node):
|
||||
''' Helper to fetch a file path from sp_layout.json. '''
|
||||
|
@ -200,7 +200,7 @@ def gen_fiptool_args(sp_layout, sp, args :dict):
|
|||
else:
|
||||
with open(get_sp_manifest_full_path(sp_layout[sp], args), "r") as pm_f:
|
||||
uuid_lines = [l for l in pm_f if 'uuid' in l]
|
||||
assert(len(uuid_lines) is 1)
|
||||
assert(len(uuid_lines) == 1)
|
||||
# The uuid field in SP manifest is the little endian representation
|
||||
# mapped to arguments as described in SMCCC section 5.3.
|
||||
# Convert each unsigned integer value to a big endian representation
|
||||
|
|
Loading…
Add table
Reference in a new issue