paycheck: Allow minor version 3 in applier.
Also fixed nits in checker.
BUG=chromium:568473
TEST=./checker_unittest.py
Change-Id: Ia791f4dc636e9c3a2921aeaa5f9dd01c247bf5bb
Reviewed-on: https://chromium-review.googlesource.com/317780
Trybot-Ready: Sen Jiang <senj@chromium.org>
Tested-by: Sen Jiang <senj@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: Sen Jiang <senj@chromium.org>
diff --git a/scripts/update_payload/applier.py b/scripts/update_payload/applier.py
index 5e95156..04791c1 100644
--- a/scripts/update_payload/applier.py
+++ b/scripts/update_payload/applier.py
@@ -497,9 +497,10 @@
if self.minor_version == common.INPLACE_MINOR_PAYLOAD_VERSION:
# Copy the src partition to the dst one; make sure we don't truncate it.
shutil.copyfile(old_part_file_name, new_part_file_name)
- elif self.minor_version == common.SOURCE_MINOR_PAYLOAD_VERSION:
- # In minor version 2, we don't want to copy the partitions, so instead
- # just make the new partition file.
+ elif (self.minor_version == common.SOURCE_MINOR_PAYLOAD_VERSION or
+ self.minor_version == common.OPSRCHASH_MINOR_PAYLOAD_VERSION):
+ # In minor version >= 2, we don't want to copy the partitions, so
+ # instead just make the new partition file.
open(new_part_file_name, 'w').close()
else:
raise PayloadError("Unknown minor version: %d" % self.minor_version)