summaryrefslogtreecommitdiffstats
path: root/tools/releasetools/check_target_files_signatures
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2011-01-27 10:20:27 -0800
committerDoug Zongker <dougz@android.com>2011-01-27 10:20:27 -0800
commit6ae5381670a12f63b4f7a18166e0886898e2083b (patch)
tree199cf5e708005091085cb10e32b3a894cf1affc2 /tools/releasetools/check_target_files_signatures
parent55d932840f1a5b412f2961f79368ecec2d28f647 (diff)
downloadbuild-6ae5381670a12f63b4f7a18166e0886898e2083b.zip
build-6ae5381670a12f63b4f7a18166e0886898e2083b.tar.gz
build-6ae5381670a12f63b4f7a18166e0886898e2083b.tar.bz2
fix check_target_files_signatures
common.UnzipTemp now returns a 2-tuple instead of just a string. Bug: 3398407 Change-Id: Ifd0408283aaa15752caa549f4510a0a3db03c3fd
Diffstat (limited to 'tools/releasetools/check_target_files_signatures')
-rwxr-xr-xtools/releasetools/check_target_files_signatures6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/releasetools/check_target_files_signatures b/tools/releasetools/check_target_files_signatures
index 17aebdc..2c97e2e 100755
--- a/tools/releasetools/check_target_files_signatures
+++ b/tools/releasetools/check_target_files_signatures
@@ -47,7 +47,6 @@ if sys.hexversion < 0x02040000:
import os
import re
-import sha
import shutil
import subprocess
import tempfile
@@ -112,7 +111,7 @@ class CertDB(object):
self.certs[cert] = self.certs[cert] + "," + name
else:
if name is None:
- name = "unknown cert %s (%s)" % (sha.sha(cert).hexdigest()[:12],
+ name = "unknown cert %s (%s)" % (common.sha1(cert).hexdigest()[:12],
GetCertSubject(cert))
self.certs[cert] = name
@@ -245,7 +244,7 @@ class TargetFiles(object):
self.max_fn_len = 20
def LoadZipFile(self, filename):
- d = common.UnzipTemp(filename, '*.apk')
+ d, z = common.UnzipTemp(filename, '*.apk')
try:
self.apks = {}
self.apks_by_basename = {}
@@ -263,7 +262,6 @@ class TargetFiles(object):
finally:
shutil.rmtree(d)
- z = zipfile.ZipFile(open(filename, "rb"))
self.certmap = common.ReadApkCerts(z)
z.close()