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

Fixed minor showCamera problems #375

Merged
merged 1 commit into from Aug 10, 2018
Merged

Conversation

RobertLuptonTheGood
Copy link
Member

No description provided.

if self.verbose:
log.info("Reading %s: %s" % (ccd.getId(), e))
print("Reading %s: %s" % (ccd.getId(), err))
log.warn("Reading %s: %s" % (ccd.getId(), err))
Copy link
Contributor

Choose a reason for hiding this comment

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

Whether the log message gets displayed or not should be up to the logger configuration, not up to the self.verbose flag (obviously, that's not the case for the print).

Copy link
Member

Choose a reason for hiding this comment

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

Also, it's preferable to defer the string formatting until the logger decides whether it is going to write the message or not. Remove the % and replace with standard arguments:

log.warn("Reading %s: %s", ccd.getId(), err)

fileName = self.butler.get(self.type + "_filename", ccd=ccd.getId(),
**self.kwargs)[0]
im = imageFactory(fileName)
im = None
Copy link
Contributor

Choose a reason for hiding this comment

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

It's already None (per line 460).

@RobertLuptonTheGood RobertLuptonTheGood merged commit fba37fc into master Aug 10, 2018
@ktlim ktlim deleted the tickets/DM-15231 branch August 25, 2018 06:44
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