Skip to content

Commit d102055

Browse files
authored
[dashing] Handle find_container_node_names error (#322) (#342)
* Handle find_container_node_names error (#322) Signed-off-by: ivanpauno <[email protected]> * Catch generic RuntimeError instead Since rclpy.node.NodeNameNonExistentError is not defined in Dashing. Signed-off-by: Jacob Perron <[email protected]>
1 parent e5b0ceb commit d102055

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ros2component/ros2component/api/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,10 @@ def find_container_node_names(*, node, node_names):
201201
"""
202202
container_node_names = []
203203
for n in node_names:
204-
services = get_service_info(node=node, remote_node_name=n.full_name)
204+
try:
205+
services = get_service_info(node=node, remote_node_name=n.full_name)
206+
except RuntimeError:
207+
continue
205208
if not any(s.name.endswith('_container/load_node') and
206209
'composition_interfaces/srv/LoadNode' in s.types
207210
for s in services):

0 commit comments

Comments
 (0)