From 3b3e3c0f6c261a8c9f989d437dc261ba84467d4f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 31 Oct 2019 07:42:50 -0600 Subject: patman: Adjust 'command' to return strings instead of bytes At present all the 'command' methods return bytes. Most of the time we actually want strings, so change this. We still need to keep the internal representation as bytes since otherwise unicode strings might break over a read() boundary (e.g. 4KB), causing errors. But we can convert the end result to strings. Add a 'binary' parameter to cover the few cases where bytes are needed. Signed-off-by: Simon Glass --- tools/binman/cbfs_util_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/binman/cbfs_util_test.py') diff --git a/tools/binman/cbfs_util_test.py b/tools/binman/cbfs_util_test.py index 772c794eceb..ddc2e09e358 100755 --- a/tools/binman/cbfs_util_test.py +++ b/tools/binman/cbfs_util_test.py @@ -56,7 +56,7 @@ class TestCbfs(unittest.TestCase): cls.have_lz4 = True try: tools.Run('lz4', '--no-frame-crc', '-c', - tools.GetInputFilename('u-boot.bin')) + tools.GetInputFilename('u-boot.bin'), binary=True) except: cls.have_lz4 = False -- cgit v1.2.3