Skip to content

Commit

Permalink
Do not run post-exposure checks if cancelling
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Dec 3, 2024
1 parent ac1108c commit 635635d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gort/overwatcher/observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,16 +415,16 @@ async def pre_observe_checks(self):
async def post_exposure(self, exp: Exposure | bool):
"""Runs post-exposure checks."""

if self._cancelling:
return

if exp is False:
raise GortError("No exposure was returned.")

# Output transparency data for the last exposure.
transparency = self.overwatcher.transparency
transparency.write_to_log(["sci"])

if self._cancelling:
return

if transparency.quality["sci"] & TransparencyQuality.BAD:
await self.notify(
"Transparency is bad. Stopping observations and starting "
Expand Down

0 comments on commit 635635d

Please sign in to comment.