From 14c4908a9827a77eba371211dd299006990f1d9d Mon Sep 17 00:00:00 2001 From: Richard Bowman Date: Tue, 4 May 2021 13:41:39 +0100 Subject: [PATCH] fix linter error --- .../api/default_extensions/camera_stage_mapping.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openflexure_microscope/api/default_extensions/camera_stage_mapping.py b/openflexure_microscope/api/default_extensions/camera_stage_mapping.py index 6630d8a3..13716359 100644 --- a/openflexure_microscope/api/default_extensions/camera_stage_mapping.py +++ b/openflexure_microscope/api/default_extensions/camera_stage_mapping.py @@ -197,8 +197,8 @@ class CSMExtension(BaseExtension): settings = self.get_settings() try: return np.array(settings["image_to_stage_displacement"]) - except KeyError: - raise ValueError("The microscope has not yet been calibrated.") + except KeyError as exc: + raise ValueError("The microscope has not yet been calibrated.") from exc def move_in_image_coordinates(self, displacement_in_pixels: XYCoordinateType): """Move by a given number of pixels on the camera"""