From 689c4c5474f483ee85f0e3a4fa4a3dd898b0d4aa Mon Sep 17 00:00:00 2001 From: appleb_m Date: Wed, 15 Apr 2026 17:00:45 +0200 Subject: [PATCH] DAQ: fix bug where execute mount may not throw an error --- src/aare/daq/daq.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/aare/daq/daq.py b/src/aare/daq/daq.py index d5281017..086a915c 100644 --- a/src/aare/daq/daq.py +++ b/src/aare/daq/daq.py @@ -605,7 +605,8 @@ class AareDAQ: # curr_sample_is_manual = True #if target is not None or not curr_sample_is_manual: logger.debug(target) - self._execute_mount_and_prepare(target) + if not self._execute_mount_and_prepare(target): + raise MountingFailed("Failed to mount sample") logger.info(f"Sample mounted: {target}") except Exception as e: self.__cfg.state_busy = False