diff options
author | Elliott Hughes <enh@google.com> | 2022-01-18 17:26:56 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2022-01-18 17:26:56 -0800 |
commit | f75518ee5c5d9e266f8c76253365b25147d87b09 (patch) | |
tree | 0011eee7053ada1b4300e9fd23a37fe0db561aaa /libsparse | |
parent | da0756b5752c694d7e6dc7dc6f3a93b3f232b33e (diff) | |
download | core-f75518ee5c5d9e266f8c76253365b25147d87b09.tar.gz |
libsparse: no xrange() in python3.
Bug: http://b/205996442
Test: treehugger
Change-Id: Ifcbbc2e67e9f54b2c4e1fd2aacf52427bc7d2831
Diffstat (limited to 'libsparse')
-rwxr-xr-x | libsparse/simg_dump.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsparse/simg_dump.py b/libsparse/simg_dump.py index b0b3b2259..8811a52fc 100755 --- a/libsparse/simg_dump.py +++ b/libsparse/simg_dump.py @@ -120,7 +120,7 @@ def main(): "output offset", "output blocks", "type", "hash"]) offset = 0 - for i in xrange(1, total_chunks + 1): + for i in range(1, total_chunks + 1): header_bin = FH.read(12) header = struct.unpack("<2H2I", header_bin) chunk_type = header[0] @@ -159,7 +159,7 @@ def main(): if showhash: h = hashlib.sha1() data = fill_bin * (blk_sz / 4); - for block in xrange(chunk_sz): + for block in range(chunk_sz): h.update(data) curhash = h.hexdigest() elif chunk_type == 0xCAC3: |