Skip to content
Myr

Merge pull request #134 from sloria/stderr

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Correctly print exceptions to stderr

authored by Armin Ronacher · committed by Armin Ronacher · parents 8d801a1, 73a3eba · Browse files · 1 file+1 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:click/exceptions.py+1 added-2 removed
1import sys1from ._compat import PY2, filename_to_ui, get_text_stderr2from .utils import echo34
15 unmodified lines
2021 def show(self, file=None):22 if file is None:23 file = get_text_stderr()25 echo('Error: %s' % self.format_message())24 echo('Error: %s' % self.format_message(), file=file)252627class UsageError(ClickException):28 """An internal exception that signals a usage error. This typically
73 unmodified lines