Make unpack.py compatible with Python 3
Change-Id: I55a0b0f4fa0e9bf24650bf72efbed25142c5b2d0
diff --git a/unpack.py b/unpack.py
index 0d376b8..5d29c9d 100755
--- a/unpack.py
+++ b/unpack.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.7
+#!/usr/bin/env python3
"""Unpacks a prebuilt to look like an Android build directory."""
@@ -24,14 +24,14 @@
adb_source_path = pristine_dir + "/adb"
# Make sure the relevant files are here - currently just adb + target files.
if not os.path.isfile(adb_source_path):
- print "ADB missing from prebuilt"
+ print("ADB missing from prebuilt")
sys.exit(1)
# Make sure we have exactly one target zip
target_files_search = pristine_dir + "/qemu_trusty_arm64-target_files-*.zip"
target_files_zip_glob = glob.glob(target_files_search)
if not target_files_zip_glob:
- print "No Android target_files found"
+ print("No Android target_files found")
sys.exit(1)
if len(target_files_zip_glob) > 1:
print ("Multiple Android target_files archives found. Please clean up "