output format with arg choices

This commit is contained in:
Daniil Fajnberg 2021-07-25 16:33:26 +02:00
parent 6a490715bf
commit 3f039ae31b

View File

@ -49,7 +49,8 @@ if __name__ == '__main__':
parser.add_argument( parser.add_argument(
'-o', '--output-format', '-o', '--output-format',
type=str, type=str,
help="Set to either 'yaml', 'json' or 'simple' format" choices=['simple', 'yaml', 'json'],
help="Determines the format in which results are returned to stdout"
) )
kwargs = vars(parser.parse_args()) kwargs = vars(parser.parse_args())
os.environ[CONFIG_FILE_ENV_VAR] = str(kwargs.pop('config_file')) os.environ[CONFIG_FILE_ENV_VAR] = str(kwargs.pop('config_file'))