diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c264692..d65fc2b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ devices connected to the data server. (`#134`) * Bugfix: Nodes with nameless options don't raise an exception when their enum attribute is called (`#165`). * Bugfix: Values of enumerated nodes can now be pickled (`#129`). +* Bugfix: `SHFScope` `run()` and `stop()` shows specified timeout value when `TimeoutError` is raised. ## Version 0.3.5 * Adapt AWG Waveform upload (`write_to_waveform_memory`) to append to existing transactions. diff --git a/src/zhinst/toolkit/driver/nodes/shfqa_scope.py b/src/zhinst/toolkit/driver/nodes/shfqa_scope.py index 033bb3ad..12ba289c 100644 --- a/src/zhinst/toolkit/driver/nodes/shfqa_scope.py +++ b/src/zhinst/toolkit/driver/nodes/shfqa_scope.py @@ -55,7 +55,8 @@ def run( self.enable.wait_for_state_change(1, timeout=timeout, sleep_time=sleep_time) except TimeoutError as error: raise TimeoutError( - "Scope could not been started within the specified timeout({timeout})s." + "Scope could not been started within " + f"the specified timeout ({timeout})s" ) from error def stop(self, *, timeout: float = 10, sleep_time: float = 0.005) -> None: @@ -76,7 +77,8 @@ def stop(self, *, timeout: float = 10, sleep_time: float = 0.005) -> None: self.enable.wait_for_state_change(0, timeout=timeout, sleep_time=sleep_time) except TimeoutError as error: raise TimeoutError( - "Scope could not been stopped within the specified timeout({timeout})s." + "Scope could not been stopped within " + f"the specified timeout ({timeout})s" ) from error def wait_done(self, *, timeout: float = 10, sleep_time: float = 0.005) -> None: