Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add early error message if using calexp as template and no id supplied #20

Merged
merged 1 commit into from May 24, 2016

Conversation

r-owen
Copy link
Contributor

@r-owen r-owen commented May 23, 2016

No description provided.

@@ -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.")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest you swap the two tests, to fail early.

Also, please improve the documentation for the templateIdList argument: indicate that the list should contain a single item, and if it contains more then only the first is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants