Skip to content

Commit 9ac45ee

Browse files
committed
fix: add awaits
1 parent fd662e8 commit 9ac45ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/dodal/devices/scintillator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,17 @@ def _get_selected_position(self, y: float, z: float) -> InOut:
7979
else:
8080
return InOut.UNKNOWN
8181

82-
def _check_aperture_parked(self):
82+
async def _check_aperture_parked(self):
8383
if (
84-
self._aperture_scatterguard().selected_aperture.get_value()
84+
await self._aperture_scatterguard().selected_aperture.get_value()
8585
!= ApertureValue.PARKED
8686
):
8787
raise ValueError(
88-
"Cannot move scintillator out if aperture/scatterguard is not parked"
88+
f"Cannot move scintillator out if aperture/scatterguard is not parked. Position is currently {await self._aperture_scatterguard().selected_aperture.get_value()}"
8989
)
9090

9191
async def _set_selected_position(self, position: InOut) -> None:
92-
self._check_aperture_parked()
92+
await self._check_aperture_parked()
9393
match position:
9494
case InOut.OUT:
9595
await self.y_mm.set(self._scintillator_out_yz_mm[0])

0 commit comments

Comments
 (0)