Skip to content

Commit

Permalink
Improve error message for command time collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
mfisherlevine committed Dec 4, 2024
1 parent ec0ad1d commit cdfd34b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/lsst/summit/utils/efdUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,8 @@ def getCommands(
timeKey = time.to_pydatetime()

if timeKey in commandTimes:
raise ValueError(f"There is already a command at {timeKey=} - make a better data structure!")
msg = f"There is already a command at {timeKey=} - make a better data structure!"
msg += f"Colliding commands = {commandTimes[timeKey]} and {command}"
raise ValueError(msg)
commandTimes[timeKey] = command
return commandTimes

0 comments on commit cdfd34b

Please sign in to comment.