Skip to content
Commit d9a64b7b authored by Evgeniy Paltsev's avatar Evgeniy Paltsev Committed by Anas Nashif
Browse files

twister: fix UnicodeDecodeError on input handling in BinaryHandler



In BinaryHandler we process input from simulator with decode('utf-8')
to convert it to string. decode has strict error handling by default -
so it raises UnicodeDecodeError exception if it can't decode input
binary sequence.

So if test start to print some junk to uart console we get
UnicodeDecodeError exception which cause the whole twister crash.

To fix that switch decode to less strict error handling when it
just replace undecoded binary sequence with unicode replacement
character.

Signed-off-by: default avatarEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: default avatarEvgeniy Paltsev <PaltsevEvgeniy@gmail.com>
parent b2a95831
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment