diff options
author | Simon Glass <sjg@chromium.org> | 2019-10-31 16:42:50 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-11-05 04:15:32 +0300 |
commit | 3b3e3c0f6c261a8c9f989d437dc261ba84467d4f (patch) | |
tree | fef28e49d1b53f29979a5a2c5ed88065bcc5fbe9 /tools/binman | |
parent | f0921f5098d8d98ac38121837aaf7c4b4cb13bb4 (diff) | |
download | u-boot-3b3e3c0f6c261a8c9f989d437dc261ba84467d4f.tar.xz |
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 <sjg@chromium.org>
Diffstat (limited to 'tools/binman')
-rwxr-xr-x | tools/binman/cbfs_util_test.py | 2 | ||||
-rw-r--r-- | tools/binman/ftest.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/binman/cbfs_util_test.py b/tools/binman/cbfs_util_test.py index 772c794ece..ddc2e09e35 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 diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 494e218cbc..93507993a0 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -174,7 +174,7 @@ class TestFunctional(unittest.TestCase): cls.have_lz4 = True try: tools.Run('lz4', '--no-frame-crc', '-c', - os.path.join(cls._indir, 'u-boot.bin')) + os.path.join(cls._indir, 'u-boot.bin'), binary=True) except: cls.have_lz4 = False |