From 679321a64f03f7dfa024d289cca470c9b270a710 Mon Sep 17 00:00:00 2001 From: Richardvdketterij Date: Mon, 12 Feb 2024 14:50:29 +0100 Subject: [PATCH] remove redundant import and redundent exit status --- smach_ros/smach_ros/simple_action_state.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/smach_ros/smach_ros/simple_action_state.py b/smach_ros/smach_ros/simple_action_state.py index 3c97009..7fae6cd 100644 --- a/smach_ros/smach_ros/simple_action_state.py +++ b/smach_ros/smach_ros/simple_action_state.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 import rclpy -import rclpy.time from rclpy.duration import Duration import rclpy.action from rclpy.action.client import GoalStatus @@ -236,8 +235,7 @@ def _execution_timer(self): try: # Check for preemption while checking for timeout if self.preempt_requested(): - self.node.get_logger().info( - f"Preempting while waiting for goal (request) result '{self._action_name}'.") + self.node.get_logger().info(f"Preempting while waiting for goal (request) result '{self._action_name}'.") self._status = ActionState.CANCELED with self._done_cond: self._done_cond.notify() @@ -418,9 +416,6 @@ def execute(self, ud): if self.preempt_requested(): self.service_preempt() outcome = 'preempted' - elif self._status == ActionState.INACTIVE: - # Aborted via execution timeout - outcome = 'aborted' elif self._status == ActionState.CANCELING: # Preempting or exec timeout but goal not cancelled outcome = 'aborted'