From 442c77eff99ee7cb8a59581d965779edcc86c779 Mon Sep 17 00:00:00 2001 From: oysand Date: Fri, 11 Oct 2024 14:17:13 +0200 Subject: [PATCH] Rename exception --- src/isar/state_machine/states/monitor.py | 9 +++------ .../models/exceptions/robot_exceptions.py | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/isar/state_machine/states/monitor.py b/src/isar/state_machine/states/monitor.py index d182dbae..48e96800 100644 --- a/src/isar/state_machine/states/monitor.py +++ b/src/isar/state_machine/states/monitor.py @@ -16,15 +16,12 @@ RobotCommunicationTimeoutException, RobotException, RobotRetrieveInspectionException, - RobotStepStatusException, + RobotTaskStatusException, ) from robot_interface.models.inspection.inspection import Inspection from robot_interface.models.mission.mission import Mission from robot_interface.models.mission.status import TaskStatus -from robot_interface.models.mission.task import Task -from robot_interface.models.mission.task import ( - InspectionTask, -) +from robot_interface.models.mission.task import InspectionTask, Task if TYPE_CHECKING: from isar.state_machine.state_machine import StateMachine @@ -85,7 +82,7 @@ def _run(self) -> None: else: continue - except RobotStepStatusException as e: + except RobotTaskStatusException as e: self.state_machine.current_task.error_message = ErrorMessage( error_reason=e.error_reason, error_description=e.error_description ) diff --git a/src/robot_interface/models/exceptions/robot_exceptions.py b/src/robot_interface/models/exceptions/robot_exceptions.py index dea21cf5..78f0279e 100644 --- a/src/robot_interface/models/exceptions/robot_exceptions.py +++ b/src/robot_interface/models/exceptions/robot_exceptions.py @@ -103,7 +103,7 @@ def __init__(self, error_description: str) -> None: # An exception which should be thrown by the robot package if it is unable to collect # the status of the current step. -class RobotStepStatusException(RobotException): +class RobotTaskStatusException(RobotException): def __init__(self, error_description: str) -> None: super().__init__( error_reason=ErrorReason.RobotStepStatusException,