Skip to content

Commit e6d8995

Browse files
authored
Fix AttributeError when accessing component container name (#177) (#241)
`self.__target_container` is not necessarily an ExecuteProcess action, and therefore may not have a 'name' attribute. Signed-off-by: Jacob Perron <[email protected]>
1 parent ce395f7 commit e6d8995

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

launch_ros/launch_ros/actions/load_composable_nodes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ def unblock(future):
140140
add_node_name(context, node_name)
141141
node_name_count = get_node_name_count(context, node_name)
142142
if node_name_count > 1:
143-
container_logger = launch.logging.get_logger(self.__target_container.name)
143+
container_logger = launch.logging.get_logger(
144+
self.__final_target_container_name
145+
)
144146
container_logger.warning(
145147
'there are now at least {} nodes with the name {} created within this '
146148
'launch context'.format(node_name_count, node_name)

0 commit comments

Comments
 (0)