summaryrefslogtreecommitdiffstats
path: root/update_verifier/care_map_generator.py
diff options
context:
space:
mode:
authorKrzysztof Kosiński <krzysio@google.com>2021-02-25 01:02:25 +0100
committerKrzysztof Kosiński <krzysio@google.com>2021-02-25 21:09:38 +0100
commit9c857f8fb1085a1adfacc0c3091f7c07d7c60b06 (patch)
treed356e382ca11302d1c2b81f716845e918183777c /update_verifier/care_map_generator.py
parentMerge "updater: Do not null terminate mount_flags_list array" (diff)
downloadandroid_bootable_recovery-9c857f8fb1085a1adfacc0c3091f7c07d7c60b06.tar
android_bootable_recovery-9c857f8fb1085a1adfacc0c3091f7c07d7c60b06.tar.gz
android_bootable_recovery-9c857f8fb1085a1adfacc0c3091f7c07d7c60b06.tar.bz2
android_bootable_recovery-9c857f8fb1085a1adfacc0c3091f7c07d7c60b06.tar.lz
android_bootable_recovery-9c857f8fb1085a1adfacc0c3091f7c07d7c60b06.tar.xz
android_bootable_recovery-9c857f8fb1085a1adfacc0c3091f7c07d7c60b06.tar.zst
android_bootable_recovery-9c857f8fb1085a1adfacc0c3091f7c07d7c60b06.zip
Diffstat (limited to 'update_verifier/care_map_generator.py')
-rw-r--r--update_verifier/care_map_generator.py6
1 files changed, 3 insertions, 3 deletions
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)