diff --git a/rclpy/executors/examples_rclpy_executors/custom_executor.py b/rclpy/executors/examples_rclpy_executors/custom_executor.py index 6b18bf14..a6df7d25 100644 --- a/rclpy/executors/examples_rclpy_executors/custom_executor.py +++ b/rclpy/executors/examples_rclpy_executors/custom_executor.py @@ -67,7 +67,7 @@ def spin_once(self, timeout_sec=None): """ # wait_for_ready_callbacks yields callbacks that are ready to be executed try: - handler, group, node = next(self.wait_for_ready_callbacks(timeout_sec=timeout_sec)) + handler, group, node = self.wait_for_ready_callbacks(timeout_sec=timeout_sec) except StopIteration: pass else: