mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
fix(common/tools): coin must be either supported or unsupported
This commit is contained in:
parent
334f7bbbe6
commit
7295d2ee1e
@ -102,6 +102,8 @@ def check_support_values():
|
||||
errors = []
|
||||
for device, values in SUPPORT_INFO.items():
|
||||
supported = values.get("supported")
|
||||
unsupported = values.get("unsupported")
|
||||
|
||||
if not isinstance(supported, dict):
|
||||
errors.append(f"Missing 'supported' dict for {device}")
|
||||
else:
|
||||
@ -112,10 +114,13 @@ def check_support_values():
|
||||
else:
|
||||
if value is not True:
|
||||
raise ValueError(f"only allowed is True, but found {value}")
|
||||
|
||||
if key in unsupported:
|
||||
raise ValueError(f"{key} is both supported and unsupported")
|
||||
|
||||
except Exception as e:
|
||||
errors.append(f"{device}.supported.{key}: {e}")
|
||||
|
||||
unsupported = values.get("unsupported")
|
||||
if not isinstance(unsupported, dict):
|
||||
errors.append(f"Missing 'supported' dict for {device}")
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user