Closed bobvanderlinden closed 8 years ago
Oh, I must add that I'm not 100% sure whether the output that protoc-gen-depends generates is actually correct (I have not tested the .d files), but everything still functions the same way, except that byte-strings are used instead of text-strings.
Found a nicer way to read all bytes from stdin. This will make the code a bit simpler, but still just reads bytes (without using any text-encoding).
Well done, you could rebase the second commit as fixup to keep the history clean.
Alright, fixed up original commit with the simplified calls.
Thanks!
On Wed, Sep 2, 2015 at 7:40 AM Michael Haberler notifications@github.com wrote:
Merged #23 https://github.com/machinekit/machinetalk-protobuf/pull/23.
— Reply to this email directly or view it on GitHub https://github.com/machinekit/machinetalk-protobuf/pull/23#event-398550721 .
When running make, I had the following error:
It was caused by stdin being read as a text-stream (default for sys.stdin). My machine is configured to use UTF-8 as text-encoding and in turn it seemed Python couldn't decode the stream as UTF-8.
This change uses sys.stdin.buffer, instead of sys.stdin, which should read bytes instead of encoded-text-strings.