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>
This commit is contained in:
Yilin Yang 2020-09-24 17:24:07 +08:00 committed by Commit Bot
parent 24f0377590
commit 512b9c0ad6
1 changed files with 1 additions and 1 deletions

View File

@ -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))