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

Make sys.exit messages show red in terminal #1420

Merged
merged 3 commits into from
Sep 23, 2020

Conversation

ndevenish
Copy link
Member

@ndevenish ndevenish commented Sep 22, 2020

Logging shows errors in red now, but calls to sys.exit bypassed this. In this pull, this is corrected by the standard dials context wrapper, previously used to show the mail message to users.

I've called the new function show_mail_handle_errors instead of show_mail_on_error because it's starting to do more work than just mail notice handling, and I thought that the scope of what it actually does had crept up enough that the name is confusing.

I'm open to suggestions for better names.

(The most important changes are in util/__init__.py )

Replaces show_mail_on_error with show_mail_handle_errors.
Copy link
Member

@Anthchirp Anthchirp left a comment

Choose a reason for hiding this comment

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

Looking good. I like the simplified control flow

util/__init__.py Outdated Show resolved Hide resolved
ndevenish and others added 2 commits September 22, 2020 14:50
Co-authored-by: Markus Gerstel <2102431+Anthchirp@users.noreply.github.com>
@ndevenish ndevenish merged commit 414c84f into dials:master Sep 23, 2020
@ndevenish ndevenish deleted the exit_colour branch September 23, 2020 15:31
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