From 3d67dfae97f3e84d6e04b71942bcf0284a185f9d Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Mon, 12 Aug 2024 10:07:18 +0200 Subject: [PATCH] Exit with code 1 on unreached CM --- controller_manager/controller_manager/spawner.py | 1 + controller_manager/controller_manager/unspawner.py | 1 + 2 files changed, 2 insertions(+) diff --git a/controller_manager/controller_manager/spawner.py b/controller_manager/controller_manager/spawner.py index ac319d027c..cf313e0e5a 100644 --- a/controller_manager/controller_manager/spawner.py +++ b/controller_manager/controller_manager/spawner.py @@ -420,6 +420,7 @@ def main(args=None): pass except ServiceNotFoundError as err: node.get_logger().fatal(str(err)) + return 1 finally: rclpy.shutdown() diff --git a/controller_manager/controller_manager/unspawner.py b/controller_manager/controller_manager/unspawner.py index ff4e2b06f2..e42d85aee9 100644 --- a/controller_manager/controller_manager/unspawner.py +++ b/controller_manager/controller_manager/unspawner.py @@ -62,6 +62,7 @@ def main(args=None): pass except ServiceNotFoundError as err: node.get_logger().fatal(str(err)) + return 1 finally: rclpy.shutdown()