Fix import script param parsing bool value

The issue to fix is when the default boolean value True is passed
to the is_usm_iso, it is not validated as the condition check is
to only use string 'True'.

This commit is to ensure when the default boolean value is passed to the
usm_load_import script,  it can be parsed as the boolean script.

Test Plan:

PASS: build the iso
PASS: upload the iso to 22.12 system
PASS: upload N-1 load on system control that contains this fix.

Task: 50993
Story: 2010676
Change-Id: I1d7651d0ff26d31e52589f1b039a788c058fdb3d
Signed-off-by: junfeng-li <junfeng.li@windriver.com>
This commit is contained in:
junfeng-li 2024-09-10 16:42:49 +00:00
parent 4bea98b405
commit 2fbe0df73e

View File

@ -298,7 +298,7 @@ def main():
LOG.info("Load import from %s to %s started", args.from_release, args.to_release)
load_import(args.from_release, args.to_release, args.iso_dir)
if args.is_usm_iso == "True":
if args.is_usm_iso in ["True", True]:
move_metadata_file_to_available_dir(args.to_release, args.iso_dir)
else:
# pre USM iso needs to generate metadata file