diff --git a/ros2cli/ros2cli/node/direct.py b/ros2cli/ros2cli/node/direct.py index c426394c2..269e5aa82 100644 --- a/ros2cli/ros2cli/node/direct.py +++ b/ros2cli/ros2cli/node/direct.py @@ -84,7 +84,7 @@ def __getattr__(self, name): def __exit__(self, exc_type, exc_value, traceback): self.node.destroy_node() - rclpy.shutdown() + rclpy.try_shutdown() def add_arguments(parser):