patman: Don't convert input data to unicode
authorSimon Glass <sjg@chromium.org>
Mon, 29 May 2017 21:31:24 +0000 (15:31 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 9 Jun 2017 02:21:59 +0000 (20:21 -0600)
commit5c724dc4403c63b86fef8cccd2baa47cfa870986
tree50b4d737cb95c8b7d7f16cfadbc7c5b8f96a0844
parent6f8abf765b9a8be4a32d84677cbbff1a1706b325
patman: Don't convert input data to unicode

The communication filter reads data in blocks and converts each block to
unicode (if necessary) one at a time. In the unlikely event that a unicode
character in the input spans a block this will not work. We get an error
like:

UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1022-1023:
   unexpected end of data

There is no need to change the input to unicode, so the easiest fix is to
drop this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
tools/patman/cros_subprocess.py