diff options
author | Daniel Zheng <zhengdaniel@google.com> | 2024-05-02 09:54:26 -0700 |
---|---|---|
committer | Daniel Zheng <zhengdaniel@google.com> | 2024-05-02 09:55:45 -0700 |
commit | 7e4cc58f2d37b67192c2b4cc908ebf5f1bb6e4fe (patch) | |
tree | 9280a6852a178a689642f1339cf00e63f373b8c2 | |
parent | 563a2f62c589f776034427c538b2b29bcfb61c23 (diff) | |
download | build-7e4cc58f2d37b67192c2b4cc908ebf5f1bb6e4fe.tar.gz |
create_brick_ota: logic fix
ota_metadata should be initialized outside of the if block.
Bug: 3072303
Test: th
Change-Id: Iabe52be3557c71921586d960d8a8a91c33d5558b
-rw-r--r-- | tools/releasetools/create_brick_ota.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/releasetools/create_brick_ota.py b/tools/releasetools/create_brick_ota.py index 9e040a53d4..bf50f71049 100644 --- a/tools/releasetools/create_brick_ota.py +++ b/tools/releasetools/create_brick_ota.py @@ -45,10 +45,10 @@ def CreateBrickOta(product_name: str, output_path: Path, extra_wipe_partitions: partitions_to_wipe = PARTITIONS_TO_WIPE if extra_wipe_partitions is not None: partitions_to_wipe = PARTITIONS_TO_WIPE + extra_wipe_partitions.split(",") - ota_metadata = ["ota-type=BRICK", "post-timestamp=9999999999", - "pre-device=" + product_name] - if serialno is not None: - ota_metadata.append("serialno=" + serialno) + ota_metadata = ["ota-type=BRICK", "post-timestamp=9999999999", + "pre-device=" + product_name] + if serialno is not None: + ota_metadata.append("serialno=" + serialno) # recovery requiers product name to be a | separated list product_name = product_name.replace(",", "|") with zipfile.ZipFile(output_path, "w") as zfp: |