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 8b72aefb5a.

Test: Generate an incremental BBOTA package.
Change-Id: I7f95231683473b4f0f07f9c83fccc0e36a1340cb
This commit is contained in:
Tao Bao
2018-02-06 15:01:54 -08:00
parent f733f896d3
commit fe97dbd4ce
2 changed files with 22 additions and 14 deletions

View File

@@ -191,8 +191,7 @@ class Transfer(object):
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.