releasetools: Make additional modules Python 3 compatible.

Bug: 131631303
Test: `python -m unittest test_sign_target_files_apks`
Test: `python3 -m unittest test_sign_target_files_apks`
Test: `python -m unittest test_add_img_to_target_files`
Test: `python3 -m unittest test_add_img_to_target_files`
Test: `python -m unittest test_ota_from_target_files`
Test: `python3 -m unittest test_ota_from_target_files`
Test: `python -m unittest test_validate_target_files`
Test: `python3 -m unittest test_validate_target_files`
Test: Run `python3 ota_from_target_files.py` to generate an OTA.
Test: Run `python3 sign_target_files_apks.py` to sign a target_files.
Change-Id: I56b45bbcbf7aa83e690785a9640c0212e45d12d8
This commit is contained in:
Tao Bao
2019-06-24 15:33:41 -07:00
parent 6b261101e4
commit a370545a2c
6 changed files with 29 additions and 27 deletions

View File

@@ -54,7 +54,9 @@ class Options(object):
base_search_path = os.path.join(base_out_path,
os.path.basename(os.getcwd()))
# Python >= 3.3 returns 'linux', whereas Python 2.7 gives 'linux2'.
platform_search_path = {
"linux": os.path.join(base_search_path, "host/linux-x86"),
"linux2": os.path.join(base_search_path, "host/linux-x86"),
"darwin": os.path.join(base_search_path, "host/darwin-x86"),
}