releasetools: Remove the dead code for blockimgdiff_version <= 2.
The code is on infeasible path since we already have assertions in
common.BlockDifference().
Also remove the dead code that checks for OPTIONS.info_dict, as we
already set that in ota_from_target_files.main(), for both of A/B and
non-A/B.
Test: Generate incremental OTAs w/ and w/o the CL, and get identical
packages.
Change-Id: Ifb8fc101e78f5ce58c60c8e49028b66ce0d20246
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 829b8db..12e757d 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -1431,11 +1431,9 @@
self.disable_imgdiff = disable_imgdiff
if version is None:
- version = 1
- if OPTIONS.info_dict:
- version = max(
- int(i) for i in
- OPTIONS.info_dict.get("blockimgdiff_versions", "1").split(","))
+ version = max(
+ int(i) for i in
+ OPTIONS.info_dict.get("blockimgdiff_versions", "1").split(","))
assert version >= 3
self.version = version