[Piglit] [PATCH 1/2] framework: handle UnicodeDecodeError

Marek Olšák maraeo at gmail.com
Mon Feb 6 23:58:30 UTC 2017

On Mon, Feb 6, 2017 at 11:57 PM, Dylan Baker <dylan at pnwbakers.com> wrote:
> Quoting Marek Olšák (2017-02-06 14:39:03)
>> On Mon, Feb 6, 2017 at 11:10 PM, Dylan Baker <dylan at pnwbakers.com> wrote:
>> > I'm curious when you're hitting this because while this works around the problem
>> > it's not really fixing it, and I'd really like to fix it correctly.
>> I don't remember. I guess the stdout/stderr output contained some
>> characters that python couldn't accept. For example, the LLVM
>> assembler prints errors to stdout/stderr with colors.
>> Marek
> Interesting. Maybe the better thing to do then is to set the 'errors' flag of
> bytes.decode to 'replace':
> out.decode(encoding='utf-8', errors='replace')
> Which would just take things it can't decode and use the � character. Does that
> sound like a better plan since it would give a result other than crash?

Any fix is OK with me, though I don't plan to spend any time on this.


More information about the Piglit mailing list