support pipeline as "list in string"

This commit is contained in:
svlandeg 2020-09-11 11:08:46 +02:00
parent 2247d62655
commit 5b94aeece9

View File

@ -42,6 +42,8 @@ def init_config_cli(
""" """
if isinstance(optimize, Optimizations): # instance of enum from the CLI if isinstance(optimize, Optimizations): # instance of enum from the CLI
optimize = optimize.value optimize = optimize.value
if pipeline.startswith("[") and pipeline.endswith("]"):
pipeline = pipeline[1:-1]
pipeline = [p.strip() for p in pipeline.split(",")] pipeline = [p.strip() for p in pipeline.split(",")]
init_config(output_file, lang=lang, pipeline=pipeline, optimize=optimize, cpu=cpu) init_config(output_file, lang=lang, pipeline=pipeline, optimize=optimize, cpu=cpu)