fix: do not force use_data usage
This commit is contained in:
parent
9fb4cb8351
commit
e11885fbd7
2 changed files with 13 additions and 5 deletions
|
|
@ -20,6 +20,7 @@ from tiramisu_cmdline_parser import TiramisuCmdlineParser
|
|||
from tiramisu.error import PropertiesOptionError
|
||||
from tiramisu import Config
|
||||
from pathlib import Path
|
||||
from sys import exit
|
||||
|
||||
from rougail import Rougail
|
||||
from rougail.config import get_rougail_config
|
||||
|
|
@ -107,8 +108,11 @@ def _main(arguments, do_not_print):
|
|||
except PropertiesOptionError:
|
||||
user_data_names = []
|
||||
# structural
|
||||
rougail = Rougail(rougailconfig)
|
||||
config = rougail.run()
|
||||
if rougailconfig["cli.load_config"]:
|
||||
rougail = Rougail(rougailconfig)
|
||||
config = rougail.run()
|
||||
else:
|
||||
config = None
|
||||
# data user
|
||||
if not user_data_names:
|
||||
user_datas = None
|
||||
|
|
@ -155,7 +159,8 @@ def _main(arguments, do_not_print):
|
|||
err_warn["errors"].extend(ret["errors"])
|
||||
err_warn["warnings"].extend(ret["warnings"])
|
||||
# output
|
||||
config.property.read_only()
|
||||
if config:
|
||||
config.property.read_only()
|
||||
output_name = rougailconfig["step.output"]
|
||||
path = Path(__file__).parent.parent / ("output_" + output_name) / "__init__.py"
|
||||
if not path.is_file():
|
||||
|
|
@ -185,5 +190,4 @@ def main(arguments=None, do_not_print=False):
|
|||
if print_traceback:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
print(_("ERROR: {0}").format(err))
|
||||
exit(1)
|
||||
exit(_("ERROR: {0}").format(err))
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ cli:
|
|||
versions:
|
||||
description: {_('display rougail version and all componants')}
|
||||
default: false
|
||||
|
||||
load_config:
|
||||
default: true
|
||||
hidden: true
|
||||
"""
|
||||
return {
|
||||
"options": options,
|
||||
|
|
|
|||
Loading…
Reference in a new issue