Skip to content

Commit

Permalink
Raise a dark cal missing data error from None
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanconn committed Sep 26, 2024
1 parent 99ad0f9 commit 1c02230
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mica/archive/aca_dark/dark_cal.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ def _get_dark_cal_id_scalar(date, select="before", dark_cal_ids=None):
try:
out_dark_id = dark_cal_ids[ii]
except IndexError as err:
raise MissingDataError("No dark cal found {} {}".format(select, date)) from err
raise MissingDataError(
f"No dark cal found {select} {date} (no '{ii}' key in dark cal IDs) "
) from None

return out_dark_id

Expand Down

0 comments on commit 1c02230

Please sign in to comment.