Merge "releasetools: Make apex_utils Python 3 compatible." am: 58abe77060

am: da5b3b5178

Change-Id: I1c44ac55ea7709410f4fa3a91cf0e41d2df018a3
This commit is contained in:
Tao Bao
2019-06-25 16:07:39 -07:00
committed by android-build-merger

View File

@@ -59,9 +59,9 @@ def SignApexPayload(payload_file, payload_key_path, payload_key_name, algorithm,
try:
common.RunAndCheckOutput(cmd)
except common.ExternalError as e:
raise ApexSigningError, \
raise ApexSigningError(
'Failed to sign APEX payload {} with {}:\n{}'.format(
payload_file, payload_key_path, e), sys.exc_info()[2]
payload_file, payload_key_path, e))
# Verify the signed payload image with specified public key.
logger.info('Verifying %s', payload_file)
@@ -75,9 +75,9 @@ def VerifyApexPayload(payload_file, payload_key):
try:
common.RunAndCheckOutput(cmd)
except common.ExternalError as e:
raise ApexSigningError, \
raise ApexSigningError(
'Failed to validate payload signing for {} with {}:\n{}'.format(
payload_file, payload_key, e), sys.exc_info()[2]
payload_file, payload_key, e))
def ParseApexPayloadInfo(payload_path):
@@ -100,9 +100,9 @@ def ParseApexPayloadInfo(payload_path):
try:
output = common.RunAndCheckOutput(cmd)
except common.ExternalError as e:
raise ApexInfoError, \
raise ApexInfoError(
'Failed to get APEX payload info for {}:\n{}'.format(
payload_path, e), sys.exc_info()[2]
payload_path, e))
# Extract the Algorithm / Salt / Prop info from payload (i.e. an image signed
# with avbtool). For example,