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

DM-22108: Fix gen3 handling of defects. #115

Merged
merged 1 commit into from Nov 6, 2019
Merged

DM-22108: Fix gen3 handling of defects. #115

merged 1 commit into from Nov 6, 2019

Conversation

czwa
Copy link
Contributor

@czwa czwa commented Nov 5, 2019

This should resolve KeyError exceptions when the inputs hash does not
contain defects.

python/lsst/ip/isr/isrTask.py Outdated Show resolved Hide resolved
@czwa
Copy link
Contributor Author

czwa commented Nov 5, 2019

Jenkins noted that there is no doDefects and that it is doDefect.

if self.config.doDefect is True:
if "defects" not in inputs:
inputs['defects'] = None
if inputs['defects'] is not None:
Copy link
Member

@timj timj Nov 5, 2019

Choose a reason for hiding this comment

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

Are both if checks needed separately? Can't we combine?

if "defects" in inputs and inputs["defect"] is not None:

saves us from doing an extra assignment?

Copy link
Contributor

@plazas plazas left a comment

Choose a reason for hiding this comment

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

The changes look good. The only question I had is, if the user sets self.config.doDefects=True but there are no defect list, then inputs['defects'] = None, should it complain or raise or warn or say something like “you told me to do defects, but I can’t find any defects list”? Or is this something that happens later?. Chris has checked that indeed this is handled later along the way.

This should resolve KeyError exceptions when the inputs hash does not
contain defects.
@czwa czwa merged commit 285d8da into master Nov 6, 2019
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

3 participants