Merge "Fix str/bytes type error in ReplaceOtaKeys" into main am: f54075d5d4
Original change: https://android-review.googlesource.com/c/platform/build/+/3255473
Change-Id: Icd7a835359eaeee9d96d0c663e9a195dcce884ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index b485440..f5e3dd2 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -1131,9 +1131,9 @@
common.ZipWriteStr(output_zip, filename, temp_file.getvalue())
-def ReplaceOtaKeys(input_tf_zip, output_tf_zip, misc_info):
+def ReplaceOtaKeys(input_tf_zip: zipfile.ZipFile, output_tf_zip, misc_info):
try:
- keylist = input_tf_zip.read("META/otakeys.txt").split()
+ keylist = input_tf_zip.read("META/otakeys.txt").decode().split()
except KeyError:
raise common.ExternalError("can't read META/otakeys.txt from input")