Merge "releasetools: Ignore nonexistent APEX overrides."
am: d077c5b88e
Change-Id: Idc8e680e3140599f81c5f9cdc33e2a647a95a300
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index 04b627b..4cb3a37 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -188,6 +188,9 @@
for apex, key in OPTIONS.extra_apex_payload_keys.items():
if not key:
key = 'PRESIGNED'
+ if apex not in keys_info:
+ logger.warning('Failed to find %s in target_files; Ignored', apex)
+ continue
keys_info[apex] = (key, keys_info[apex][1])
# Apply the key remapping to container keys.