releasetools: RangeSet.monotonic is not an optional attribute.
'monotonic' has been non-optional since [1] (L-MR1). Fix the comment in
RangeSet.parse(), as well as the use in blockimgdiff.py.
[1] commit 8b72aefb5a8ed4da28c6f83854e8babf53b9cb53.
Test: Generate an incremental BBOTA package.
Change-Id: I7f95231683473b4f0f07f9c83fccc0e36a1340cb
diff --git a/tools/releasetools/blockimgdiff.py b/tools/releasetools/blockimgdiff.py
index b1ad8b6..931026b 100644
--- a/tools/releasetools/blockimgdiff.py
+++ b/tools/releasetools/blockimgdiff.py
@@ -191,8 +191,7 @@
self.tgt_sha1 = tgt_sha1
self.src_sha1 = src_sha1
self.style = style
- self.intact = (getattr(tgt_ranges, "monotonic", False) and
- getattr(src_ranges, "monotonic", False))
+ self.intact = tgt_ranges.monotonic and src_ranges.monotonic
# We use OrderedDict rather than dict so that the output is repeatable;
# otherwise it would depend on the hash values of the Transfer objects.