Fix small misuse of pass

The intention is to skip current iteration of for loop, so 'continue'
should be used instead of 'pass'

Test: th
Change-Id: Ic955beeaef74100981b351e2e7807c7fde538783
This commit is contained in:
Kelvin Zhang
2022-02-07 16:37:15 -08:00
parent 691f8b93c7
commit 9d021e996b

View File

@@ -1027,10 +1027,10 @@ def OptimizeCompressedEntries(zipfile_path):
with zipfile.ZipFile(zipfile_path, "r", allowZip64=True) as zfp:
for zinfo in zfp.filelist:
if not zinfo.filename.startswith("IMAGES/") and not zinfo.filename.startswith("META"):
pass
continue
# Don't try to store userdata.img uncompressed, it's usually huge.
if zinfo.filename.endswith("userdata.img"):
pass
continue
if zinfo.compress_size > zinfo.file_size * 0.80 and zinfo.compress_type != zipfile.ZIP_STORED:
entries_to_store.append(zinfo)
zfp.extract(zinfo, tmpdir)