Skip to content

Commit

Permalink
[dashing] Handle find_container_node_names error (#322) (#342)
Browse files Browse the repository at this point in the history
* Handle find_container_node_names error (#322)

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>

* Catch generic RuntimeError instead

Since rclpy.node.NodeNameNonExistentError is not defined in Dashing.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
  • Loading branch information
jacobperron committed Sep 26, 2019
1 parent e5b0ceb commit d102055
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ros2component/ros2component/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ def find_container_node_names(*, node, node_names):
"""
container_node_names = []
for n in node_names:
services = get_service_info(node=node, remote_node_name=n.full_name)
try:
services = get_service_info(node=node, remote_node_name=n.full_name)
except RuntimeError:
continue
if not any(s.name.endswith('_container/load_node') and
'composition_interfaces/srv/LoadNode' in s.types
for s in services):
Expand Down

0 comments on commit d102055

Please sign in to comment.