Skip to content

Commit

Permalink
explicitly reject setting multiple OTA target image to the same ECU
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Dec 26, 2023
1 parent ced541c commit 786ef4d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/images_packer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@ def main_build_offline_ota_image_bundle(args: argparse.Namespace):
)
)
if _ecu_id in image_files:
logger.warning(
logger.error(
(
f"override previously set OTA target image for ECU@{_ecu_id} "
f"from {image_files[_ecu_id]} to {_image_fpath}"
f"ERR: OTA target image for ECU@{_ecu_id} is already set to"
f"from {image_files[_ecu_id]}, please check the params"
)
)
sys.exit(errno.EINVAL)

image_files[_ecu_id] = _image_fpath
else:
logger.warning(f"ignore illegal image pair: {raw_pair}")
Expand Down

0 comments on commit 786ef4d

Please sign in to comment.