scripts: pushimage: avoid reparsing recovery instructions
image_type is re-assigned to RECOVERY when None, so will never be
None here, and the RECOVERY instructions are explicitly parsed before
parsing the image_type's instructions, so skip the image_type
instructions when it's RECOVERY.
BUG=None
TEST=CQ
Change-Id: Iecdd88f804d069649b735dc559cd32c96dc72599
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4774773
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Alex Klein <saklein@chromium.org>
Tested-by: Alex Klein <saklein@chromium.org>
diff --git a/scripts/pushimage.py b/scripts/pushimage.py
index 382ea30..71028a5 100644
--- a/scripts/pushimage.py
+++ b/scripts/pushimage.py
@@ -98,7 +98,7 @@
with open(input_insns, encoding="utf-8") as fp:
config.read_file(fp)
- if image_type is not None:
+ if image_type != constants.IMAGE_TYPE_RECOVERY:
input_insns = self.GetInsnFile(image_type)
if not os.path.exists(input_insns):
# This type doesn't have any signing instructions.