Merge "releasetools: Fix an equality check bug when asserting stash size."

am: 2af09af86b

Change-Id: I8b0293834845d0db752805496717f3117ce19f0d
This commit is contained in:
Tao Bao 2017-02-26 21:35:52 +00:00 committed by android-build-merger
commit db5463d8dd
1 changed files with 1 additions and 1 deletions

View File

@ -567,7 +567,7 @@ class BlockImageDiff(object):
cache_size = common.OPTIONS.cache_size cache_size = common.OPTIONS.cache_size
stash_threshold = common.OPTIONS.stash_threshold stash_threshold = common.OPTIONS.stash_threshold
max_allowed = cache_size * stash_threshold max_allowed = cache_size * stash_threshold
assert max_stashed_blocks * self.tgt.blocksize < max_allowed, \ assert max_stashed_blocks * self.tgt.blocksize <= max_allowed, \
'Stash size %d (%d * %d) exceeds the limit %d (%d * %.2f)' % ( 'Stash size %d (%d * %d) exceeds the limit %d (%d * %.2f)' % (
max_stashed_blocks * self.tgt.blocksize, max_stashed_blocks, max_stashed_blocks * self.tgt.blocksize, max_stashed_blocks,
self.tgt.blocksize, max_allowed, cache_size, self.tgt.blocksize, max_allowed, cache_size,