mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +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 = []
|
errors = []
|
||||||
for device, values in SUPPORT_INFO.items():
|
for device, values in SUPPORT_INFO.items():
|
||||||
supported = values.get("supported")
|
supported = values.get("supported")
|
||||||
|
unsupported = values.get("unsupported")
|
||||||
|
|
||||||
if not isinstance(supported, dict):
|
if not isinstance(supported, dict):
|
||||||
errors.append(f"Missing 'supported' dict for {device}")
|
errors.append(f"Missing 'supported' dict for {device}")
|
||||||
else:
|
else:
|
||||||
@ -112,10 +114,13 @@ def check_support_values():
|
|||||||
else:
|
else:
|
||||||
if value is not True:
|
if value is not True:
|
||||||
raise ValueError(f"only allowed is True, but found {value}")
|
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:
|
except Exception as e:
|
||||||
errors.append(f"{device}.supported.{key}: {e}")
|
errors.append(f"{device}.supported.{key}: {e}")
|
||||||
|
|
||||||
unsupported = values.get("unsupported")
|
|
||||||
if not isinstance(unsupported, dict):
|
if not isinstance(unsupported, dict):
|
||||||
errors.append(f"Missing 'supported' dict for {device}")
|
errors.append(f"Missing 'supported' dict for {device}")
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user