diff --git a/src/aare/devices/jfjoch.py b/src/aare/devices/jfjoch.py index 4a618f8f..f0d2b9c8 100644 --- a/src/aare/devices/jfjoch.py +++ b/src/aare/devices/jfjoch.py @@ -72,7 +72,11 @@ class JFJochWrapper: self._api = jfjoch_client.DefaultApi(self._client) # set before cancel(), which is itself decorated and would otherwise recurse self._connected = True - self.cancel(on_init=True) + try: + self.cancel(on_init=True) + except: + self._connected = False + raise @staticmethod def _extract_status_code(error: Exception) -> int | None: