diff --git a/debye_bec/devices/pilatus/pilatus.py b/debye_bec/devices/pilatus/pilatus.py index 7dabb0d..eec14c2 100644 --- a/debye_bec/devices/pilatus/pilatus.py +++ b/debye_bec/devices/pilatus/pilatus.py @@ -587,15 +587,15 @@ class Pilatus(PSIDeviceBase, ADBase): scan_msg.scan_name in self.xas_xrd_scan_names or scan_msg.scan_type == "step" ): # TODO how to deal with fly scans? if status.success: - status.device.file_event.put( - file_path=status.device._full_path, # pylint: disable:protected-access + status.obj.file_event.put( + file_path=status.obj._full_path, # pylint: disable:protected-access done=True, successful=True, hinted_h5_entries={"data": "/entry/data/data"}, ) else: - status.device.file_event.put( - file_path=status.device._full_path, # pylint: disable:protected-access + status.obj.file_event.put( + file_path=status.obj._full_path, # pylint: disable:protected-access done=True, successful=False, hinted_h5_entries={"data": "/entry/data/data"}, diff --git a/tests/tests_devices/test_pilatus.py b/tests/tests_devices/test_pilatus.py index 46228e3..6403e94 100644 --- a/tests/tests_devices/test_pilatus.py +++ b/tests/tests_devices/test_pilatus.py @@ -175,7 +175,7 @@ def test_pilatus_on_trigger_cancel_on_stop(pilatus): status.wait(timeout=5) -def test_pilatus_on_complete(pilatus): +def test_pilatus_on_complete(pilatus: Pilatus): """Test the on_complete logic of the Pilatus detector.""" if pilatus.scan_info.msg.scan_name.startswith("xas"):