From f6b08404fa9408e719785f89ee69df8e2457e158 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Mon, 30 Jan 2012 10:36:17 +0200 Subject: Fixed nanopb_generator.py to read the input file in binary mode. --- generator/nanopb_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'generator') diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index 2ceafc7e..337b32a5 100644 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -404,7 +404,7 @@ if __name__ == '__main__': print "Output fill be written to file.pb.h and file.pb.c" sys.exit(1) - data = open(sys.argv[1]).read() + data = open(sys.argv[1], 'rb').read() fdesc = descriptor.FileDescriptorSet.FromString(data) enums, messages = parse_file(fdesc.file[0]) -- cgit 1.2.3-korg