diff --git a/src/isar/state_machine/states/monitor.py b/src/isar/state_machine/states/monitor.py index a7d8b1fe..e92bc76e 100644 --- a/src/isar/state_machine/states/monitor.py +++ b/src/isar/state_machine/states/monitor.py @@ -80,8 +80,8 @@ def _run(self) -> None: RobotCommunicationTimeoutException, RobotCommunicationException, ) as e: - task_failed: bool = self._handle_communication_retry(e) - if task_failed: + retry_limit_exceeded: bool = self._check_if_exceeded_retry_limit(e) + if retry_limit_exceeded: self.logger.error( f"Monitoring task {self.state_machine.current_task.id[:8]} failed " f"because: {e.error_description}" @@ -219,7 +219,7 @@ def _set_error_message(self, e: RobotException) -> None: ) self.state_machine.current_task.error_message = error_message - def _handle_communication_retry( + def _check_if_exceeded_retry_limit( self, e: Union[RobotCommunicationTimeoutException, RobotCommunicationException] ) -> bool: self.state_machine.current_mission.error_message = ErrorMessage(