am 1aa1af0e
: sparse_img.py: Don\'t write empty map groups.
* commit '1aa1af0e997699bc025e4f0a754692068328d7e6': sparse_img.py: Don't write empty map groups.
This commit is contained in:
commit
608d9d2452
1 changed files with 6 additions and 2 deletions
|
@ -201,8 +201,12 @@ class SparseImage(object):
|
|||
nonzero_blocks.append(b)
|
||||
nonzero_blocks.append(b+1)
|
||||
|
||||
out["__ZERO"] = RangeSet(data=zero_blocks)
|
||||
out["__NONZERO"] = RangeSet(data=nonzero_blocks)
|
||||
assert zero_blocks or nonzero_blocks
|
||||
|
||||
if zero_blocks:
|
||||
out["__ZERO"] = RangeSet(data=zero_blocks)
|
||||
if nonzero_blocks:
|
||||
out["__NONZERO"] = RangeSet(data=nonzero_blocks)
|
||||
|
||||
def ResetFileMap(self):
|
||||
"""Throw away the file map and treat the entire image as
|
||||
|
|
Loading…
Reference in a new issue