From 4c2775970d918f686010b70211f61b9f24e6ed9f Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Mon, 5 May 2025 11:34:30 -0700 Subject: [PATCH] change team_config to object instead of list --- jc/parsers/nmcli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jc/parsers/nmcli.py b/jc/parsers/nmcli.py index 88e00de7..16c85407 100644 --- a/jc/parsers/nmcli.py +++ b/jc/parsers/nmcli.py @@ -325,7 +325,7 @@ def _connection_show_x_parse(data: str) -> List[Dict]: in_team_config = True _, value = line.split(':', maxsplit=1) team_config_value.append(value.strip()) - item['team_config'] = [] + item['team_config'] = {} continue if not line.startswith('team.') and in_team_config: @@ -335,6 +335,7 @@ def _connection_show_x_parse(data: str) -> List[Dict]: in_team_config = False if team_config_value: + # team.config value should always be JSON item['team_config'] = json.loads(''.join(team_config_value)) team_config_value = []