mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Simplify error message
This commit is contained in:
parent
a446307d44
commit
c9cc6e2aed
1 changed files with 4 additions and 3 deletions
|
|
@ -44,9 +44,10 @@ def catch_errors(f):
|
||||||
def validate_verbosity(ctx, param, value):
|
def validate_verbosity(ctx, param, value):
|
||||||
x = getattr(log.logging, value.upper(), None)
|
x = getattr(log.logging, value.upper(), None)
|
||||||
if x is None:
|
if x is None:
|
||||||
raise click.BadParameter('Invalid verbosity value {}. Must be '
|
raise click.BadParameter(
|
||||||
'CRITICAL, ERROR, WARNING, INFO or DEBUG'
|
'Must be CRITICAL, ERROR, WARNING, INFO or DEBUG, not {}'
|
||||||
.format(value))
|
.format(value)
|
||||||
|
)
|
||||||
return x
|
return x
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue