Merge "Switch care_map_generator.py to Python 3."
This commit is contained in:
commit
f2e577eda8
2 changed files with 7 additions and 7 deletions
|
@ -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,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue