From 16401ad4256178fbe7a2cd8588e6dbf9a6c63180 Mon Sep 17 00:00:00 2001 From: Simon Wilson Date: Wed, 1 Jul 2015 18:10:28 +0000 Subject: [PATCH] Revert "sparse_img.py: Don't write empty map groups." This reverts commit 7f9470cda390ee61c0fc71491d0c649fbf6e02dd. Change-Id: I97e2859903fbc4f1e6f0824269ae88b23f63e032 --- tools/releasetools/sparse_img.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/releasetools/sparse_img.py b/tools/releasetools/sparse_img.py index 59d2b71f8..7574747f5 100644 --- a/tools/releasetools/sparse_img.py +++ b/tools/releasetools/sparse_img.py @@ -204,12 +204,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