Skip to content

Commit 4026323

Browse files
vivien-applepull[bot]
authored andcommitted
[matter_yamltests] USe the type hint from the config section for node_id (#27008)
1 parent 92a28eb commit 4026323

File tree

1 file changed

+5
-2
lines changed
  • scripts/py_matter_yamltests/matter_yamltests

1 file changed

+5
-2
lines changed

scripts/py_matter_yamltests/matter_yamltests/parser.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -994,12 +994,15 @@ def __apply_config_override(self, config, config_override):
994994
if value is None or not key in config:
995995
continue
996996

997+
is_node_id = key == 'nodeId' or (isinstance(
998+
config[key], dict) and config[key].get('type') == 'node_id')
999+
9971000
if type(value) is str:
9981001
if key == 'timeout' or key == 'endpoint':
9991002
value = int(value)
1000-
elif key == 'nodeId' and value.startswith('0x'):
1003+
elif is_node_id and value.startswith('0x'):
10011004
value = int(value, 16)
1002-
elif key == 'nodeId':
1005+
elif is_node_id:
10031006
value = int(value)
10041007

10051008
if isinstance(config[key], dict) and 'defaultValue' in config[key]:

0 commit comments

Comments
 (0)