summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSimon Wilson <simonwilson@google.com>2015-07-02 00:47:50 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-02 00:47:50 +0000
commite416a41f3ae1132c0eb53d78d3d6bc60f2f0d052 (patch)
tree94951f0794d750de239f22abba30e070f2727ff8 /tools
parent8787cd6d4ec9e403557e17d6083bb180874fc08c (diff)
parent16401ad4256178fbe7a2cd8588e6dbf9a6c63180 (diff)
downloadbuild-e416a41f3ae1132c0eb53d78d3d6bc60f2f0d052.zip
build-e416a41f3ae1132c0eb53d78d3d6bc60f2f0d052.tar.gz
build-e416a41f3ae1132c0eb53d78d3d6bc60f2f0d052.tar.bz2
am 16401ad4: Revert "sparse_img.py: Don\'t write empty map groups."
* commit '16401ad4256178fbe7a2cd8588e6dbf9a6c63180': Revert "sparse_img.py: Don't write empty map groups."
Diffstat (limited to 'tools')
-rw-r--r--tools/releasetools/sparse_img.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/releasetools/sparse_img.py b/tools/releasetools/sparse_img.py
index 78f3057..c9e7e76 100644
--- a/tools/releasetools/sparse_img.py
+++ b/tools/releasetools/sparse_img.py
@@ -201,12 +201,8 @@ class SparseImage(object):
nonzero_blocks.append(b)
nonzero_blocks.append(b+1)
- assert zero_blocks or nonzero_blocks
-
- if zero_blocks:
- out["__ZERO"] = rangelib.RangeSet(data=zero_blocks)
- if nonzero_blocks:
- out["__NONZERO"] = rangelib.RangeSet(data=nonzero_blocks)
+ out["__ZERO"] = RangeSet(data=zero_blocks)
+ out["__NONZERO"] = RangeSet(data=nonzero_blocks)
def ResetFileMap(self):
"""Throw away the file map and treat the entire image as