diff options
author | Yilin Yang <kerker@google.com> | 2020-09-24 17:24:07 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-09-24 12:49:33 +0000 |
commit | 512b9c0ad6e72fb8db6b2038c6b835965fc6cbb1 (patch) | |
tree | a26b61de2f26f0aee6ec86d3860f0976fa148cbb /util | |
parent | 24f03775900d085130f4d411da3bfdfe29afc7ef (diff) | |
download | chrome-ec-512b9c0ad6e72fb8db6b2038c6b835965fc6cbb1.tar.gz |
util/unpack_ftb: Fix semantic error
`map()` returns `list` in python2, while returns iterable object in
python3.
In python3, using `list()` to wrap the output from `map()` is more
natural.
BUG=chromium:1031705
BRANCH=master
TEST=None
Signed-off-by: kerker <kerker@chromium.org>
Change-Id: Ic801d488920d07effa2316f1ea3b4160ffe21f7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2428345
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Diffstat (limited to 'util')
-rwxr-xr-x | util/unpack_ftb.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/unpack_ftb.py b/util/unpack_ftb.py index 4829a89d82..62f5161a4a 100755 --- a/util/unpack_ftb.py +++ b/util/unpack_ftb.py @@ -81,7 +81,7 @@ def main(): for key, _ in header._fields_: v = getattr(header, key) if isinstance(v, ctypes.Array): - print(key, map(hex, v)) + print(key, list(map(hex, v))) else: print(key, hex(v)) |