Skip to content
Myr

Allow the show function of click exceptions to work without context.

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

authored by Armin Ronacher · committed by Armin Ronacher · parent 765c760 · Browse files · 1 file+2 added−1 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+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:click/exceptions.py+2 added-1 removed
28 unmodified lines
29 ClickException.__init__(self, message)30 self.ctx = ctx3132 def show(self, file=None):33 if self.ctx is not None:33 echo(self.ctx.get_usage() + '\n', file=file)34 echo(self.ctx.get_usage() + '\n', file=file)35 echo('Error: %s' % self.message, file=file)363738class FileError(ClickException):
14 unmodified lines