Restrict colored_output value to always/never/auto.
This commit is contained in:
parent
7a570f8692
commit
23e66e08fa
5 changed files with 17 additions and 17 deletions
|
|
@ -128,10 +128,9 @@ def get_parsers():
|
|||
|
||||
parser['colored_output'] = argparse.ArgumentParser(add_help=False)
|
||||
parser['colored_output'].add_argument(
|
||||
'--colors',
|
||||
help='Use a colored output for different log levels.'
|
||||
'It can be a boolean or "auto" (default) which enables this '
|
||||
'feature if stdout is a tty and disables it otherwise.',
|
||||
'--colors', metavar='WHEN',
|
||||
help="Colorize cdist's output based on log level; "
|
||||
"WHEN is 'always', 'never', or 'auto'.",
|
||||
action='store', dest='colored_output', required=False,
|
||||
choices=cdist.configuration.ColoredOutputOption.CHOICES)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue