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:
parent
4b41d2e638
commit
6bda1e351f
@ -672,13 +672,13 @@ def dump(
|
|||||||
filter = filter.lower()
|
filter = filter.lower()
|
||||||
if field not in coin:
|
if field not in coin:
|
||||||
return False
|
return False
|
||||||
if not fnmatch.fnmatch(coin[field].lower(), filter):
|
if not fnmatch.fnmatch(str(coin[field]).lower(), filter):
|
||||||
return False
|
return False
|
||||||
for field, filter in exclude_filters:
|
for field, filter in exclude_filters:
|
||||||
filter = filter.lower()
|
filter = filter.lower()
|
||||||
if field not in coin:
|
if field not in coin:
|
||||||
continue
|
continue
|
||||||
if fnmatch.fnmatch(coin[field].lower(), filter):
|
if fnmatch.fnmatch(str(coin[field]).lower(), filter):
|
||||||
return False
|
return False
|
||||||
if device:
|
if device:
|
||||||
is_supported = support_info[coin["key"]].get(device, None)
|
is_supported = support_info[coin["key"]].get(device, None)
|
||||||
|
Loading…
Reference in New Issue
Block a user