Skip to content

Commit

Permalink
Add early error message if using calexp as template and no id supplied
Browse files Browse the repository at this point in the history
  • Loading branch information
isullivan committed May 23, 2016
1 parent 378d0f7 commit fbeb1a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/lsst/ip/diffim/getTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ def run(self, exposure, sensorRef, templateIdList):
if len(templateIdList) > 1:
self.log.warn("Multiple template visits supplied. Getting template from first visit: %s" %
(templateIdList[0]['visit']))
if len(templateIdList) == 0:
raise RuntimeError("No template supplied! Please supply a template visit id.")

templateId = sensorRef.dataId.copy()
templateId["visit"] = templateIdList[0]['visit']
Expand Down

0 comments on commit fbeb1a0

Please sign in to comment.