1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-17 03:48:09 +00:00

cointool: fix filtering on non-string fields

This commit is contained in:
matejcik 2019-02-01 12:58:20 +01:00
parent 4b41d2e638
commit 6bda1e351f

View File

@ -672,13 +672,13 @@ def dump(
filter = filter.lower()
if field not in coin:
return False
if not fnmatch.fnmatch(coin[field].lower(), filter):
if not fnmatch.fnmatch(str(coin[field]).lower(), filter):
return False
for field, filter in exclude_filters:
filter = filter.lower()
if field not in coin:
continue
if fnmatch.fnmatch(coin[field].lower(), filter):
if fnmatch.fnmatch(str(coin[field]).lower(), filter):
return False
if device:
is_supported = support_info[coin["key"]].get(device, None)