Skip to content

Commit

Permalink
better clean up when fails in the init
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Oct 29, 2024
1 parent 216cc0f commit e12b287
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pioreactor/background_jobs/od_reading.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,7 @@ def __init__(
self.logger.error(
"Need to supply a signal channel. Check `[od_config.photodiode_channel]` in your config."
)
self.clean_up()
raise ValueError(
"Need to supply a signal channel. Check `[od_config.photodiode_channel]` in your config."
)
Expand Down Expand Up @@ -1178,6 +1179,7 @@ def _get_ir_led_channel_from_configuration(self) -> pt.LedChannel:
A=IR
"""
)
self.clean_up()
raise KeyError("`IR` value not found in section.")

def _read_from_adc_and_transform(self) -> PdChannelToVoltage:
Expand Down

0 comments on commit e12b287

Please sign in to comment.