summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2021-02-26 03:00:39 +0100
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-02-26 03:00:39 +0100
commit57b8f5b3205bf3d9d6b5ad5812e916b9643512bc (patch)
treed988bb166f18b7b92cd34b7a8d6da59201d631f2
parent[automerger skipped] Merge ab/7061308 into stage. am: fea7439a2e -s ours (diff)
parentMerge "Switch care_map_generator.py to Python 3." am: f2e577eda8 (diff)
downloadandroid_bootable_recovery-57b8f5b3205bf3d9d6b5ad5812e916b9643512bc.tar
android_bootable_recovery-57b8f5b3205bf3d9d6b5ad5812e916b9643512bc.tar.gz
android_bootable_recovery-57b8f5b3205bf3d9d6b5ad5812e916b9643512bc.tar.bz2
android_bootable_recovery-57b8f5b3205bf3d9d6b5ad5812e916b9643512bc.tar.lz
android_bootable_recovery-57b8f5b3205bf3d9d6b5ad5812e916b9643512bc.tar.xz
android_bootable_recovery-57b8f5b3205bf3d9d6b5ad5812e916b9643512bc.tar.zst
android_bootable_recovery-57b8f5b3205bf3d9d6b5ad5812e916b9643512bc.zip
-rw-r--r--update_verifier/Android.bp8
-rw-r--r--update_verifier/care_map_generator.py6
2 files changed, 7 insertions, 7 deletions
diff --git a/update_verifier/Android.bp b/update_verifier/Android.bp
index f9a834185..ff2eff903 100644
--- a/update_verifier/Android.bp
+++ b/update_verifier/Android.bp
@@ -121,12 +121,12 @@ python_binary_host {
version: {
py2: {
- enabled: true,
- embedded_launcher: true,
- },
- py3: {
enabled: false,
embedded_launcher: false,
},
+ py3: {
+ enabled: true,
+ embedded_launcher: true,
+ },
},
}
diff --git a/update_verifier/care_map_generator.py b/update_verifier/care_map_generator.py
index 051d98deb..c6f2dad24 100644
--- a/update_verifier/care_map_generator.py
+++ b/update_verifier/care_map_generator.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2018 The Android Open Source Project
#
@@ -115,13 +115,13 @@ def main(argv):
content = input_care_map.read()
if args.parse_proto:
- result = ParseProtoMessage(content, args.fingerprint_enabled)
+ result = ParseProtoMessage(content, args.fingerprint_enabled).encode()
else:
care_map_proto = GenerateCareMapProtoFromLegacyFormat(
content.rstrip().splitlines(), args.fingerprint_enabled)
result = care_map_proto.SerializeToString()
- with open(args.output_file, 'w') as output:
+ with open(args.output_file, 'wb') as output:
output.write(result)