Chromium Code Reviews| Index: chrome/browser/resources/safe_browsing/gen_file_type_proto.py |
| diff --git a/chrome/browser/resources/safe_browsing/gen_file_type_proto.py b/chrome/browser/resources/safe_browsing/gen_file_type_proto.py |
| index 3c4b5081053de011cba2a28d4998ee0e6418a98b..1698de86d35aefcfb89644edddce2274e5f10871 100755 |
| --- a/chrome/browser/resources/safe_browsing/gen_file_type_proto.py |
| +++ b/chrome/browser/resources/safe_browsing/gen_file_type_proto.py |
| @@ -22,7 +22,7 @@ def ConvertProto(opts): |
| import google.protobuf.text_format as text_format |
| # Read the ASCII |
| - ifile = open(opts.infile, 'r') |
| + ifile = open(opts.infile, 'rb') |
|
Jialiu Lin
2016/04/22 21:36:41
should it be 'r', since you're not reading a binar
Nathan Parker
2016/04/25 22:39:19
Done.
|
| ascii_pb_str = ifile.read() |
| ifile.close() |
| @@ -34,7 +34,7 @@ def ConvertProto(opts): |
| binary_pb_str = pb.SerializeToString() |
| # Write it to disk |
| - open(opts.outfile, 'w').write(binary_pb_str) |
| + open(opts.outfile, 'wb').write(binary_pb_str) |
| def main(): |