Revert "releasetools: check_target_files_signatures.py checks APEXes."
This reverts commit d8469727bc02eecad125b397892e4eb0f718ce17. The script
is broken on target_files.zip that don't contain any APEX.
Bug: 128848294
Test: Run check_target_files_signatures.py on target_files.zip w/o APEX.
diff --git a/tools/releasetools/check_target_files_signatures.py b/tools/releasetools/check_target_files_signatures.py
index 4b0d4c7..9b76954 100755
--- a/tools/releasetools/check_target_files_signatures.py
+++ b/tools/releasetools/check_target_files_signatures.py
@@ -168,7 +168,6 @@
class APK(object):
-
def __init__(self, full_filename, filename):
self.filename = filename
self.certs = None
@@ -245,12 +244,12 @@
# must decompress them individually before we perform any analysis.
# This is the list of wildcards of files we extract from |filename|.
- apk_extensions = ['*.apk', '*.apex']
+ apk_extensions = ['*.apk']
self.certmap, compressed_extension = common.ReadApkCerts(
- zipfile.ZipFile(filename))
+ zipfile.ZipFile(filename, "r"))
if compressed_extension:
- apk_extensions.append('*.apk' + compressed_extension)
+ apk_extensions.append("*.apk" + compressed_extension)
d = common.UnzipTemp(filename, apk_extensions)
self.apks = {}
@@ -273,7 +272,7 @@
os.remove(os.path.join(dirpath, fn))
fn = uncompressed_fn
- if fn.endswith(('.apk', '.apex')):
+ if fn.endswith(".apk"):
fullname = os.path.join(dirpath, fn)
displayname = fullname[len(d)+1:]
apk = APK(fullname, displayname)