test/py: Fix unicode handling for log filtering
authorSimon Glass <sjg@chromium.org>
Tue, 2 Oct 2018 03:12:34 +0000 (21:12 -0600)
committerSimon Glass <sjg@chromium.org>
Mon, 8 Oct 2018 13:34:34 +0000 (07:34 -0600)
commit87b05ee3a918145bcf49af91bce3d5c2024e32f4
tree6a19f0a8b08d917d3d8e3784a90b9bd5f20d9bef
parentec9e0f471291233491d1bd213d32bb259821da95
test/py: Fix unicode handling for log filtering

At present the unicode filtering seems to get confused at times with
this error:

  UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position
     32: ordinal not in range(128)

It seems to be due to self._nonprint being interpreted as UTF-8. Fix it
by using ordinals instead of characters, changing the string to set.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
test/py/multiplexed_log.py