From 4853baa5e22d55699e69f215ca56fd85e6e69900 Mon Sep 17 00:00:00 2001 From: SanjayS66 Date: Wed, 29 Apr 2026 02:13:16 +0530 Subject: [PATCH] Fix #931:add 'actions' key support for YAML,keeping the existing 'children' key as a fallback Signed-off-by: SanjayS66 --- launch_yaml/launch_yaml/entity.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/launch_yaml/launch_yaml/entity.py b/launch_yaml/launch_yaml/entity.py index 93e262688..10001b9a2 100644 --- a/launch_yaml/launch_yaml/entity.py +++ b/launch_yaml/launch_yaml/entity.py @@ -63,13 +63,17 @@ def children(self) -> List['Entity']: f'\n---\n{self.__element}\n---' ) if isinstance(self.__element, dict): - if 'children' not in self.__element: + if 'actions' in self.__element: + self.__read_keys.add('actions') + children = self.__element['actions'] + elif 'children' in self.__element: + self.__read_keys.add('children') + children = self.__element['children'] + else : raise ValueError( f'Expected entity `{self.__type_name}` to have children entities.' - f'That can be a list of subentities or a dictionary with a `children` ' - 'list element') - self.__read_keys.add('children') - children = self.__element['children'] + f'That can be a list of subentities or a dictionary with an `actions` ' + f'or `children` list element') else: children = self.__element entities = []