fix: remove upgrade feature (now in formatter project) + better support of not_for_commandline feature

This commit is contained in:
egarette@silique.fr 2025-01-04 11:59:43 +01:00
parent 60ee2a6feb
commit 703b1ce70e

View file

@ -23,7 +23,6 @@ from pathlib import Path
from rougail import Rougail from rougail import Rougail
from rougail.config import get_rougail_config from rougail.config import get_rougail_config
from rougail.update import RougailUpgrade
from rougail.utils import load_modules from rougail.utils import load_modules
try: try:
from rougail.user_data_environment import RougailUserDataEnvironment from rougail.user_data_environment import RougailUserDataEnvironment
@ -39,8 +38,8 @@ def _main():
backward_compatibility=False, add_extra_options=False backward_compatibility=False, add_extra_options=False
) )
cmd_config = rougailconfig.config cmd_config = rougailconfig.config
cmd_config.property.setdefault(frozenset("not_for_commandline"), 'read_write', 'append')
cmd_config.property.read_write() cmd_config.property.read_write()
cmd_config.property.add("not_for_commandline")
if RougailUserDataEnvironment: if RougailUserDataEnvironment:
fake_rougail_config = {'step.user_data': 'environment', fake_rougail_config = {'step.user_data': 'environment',
'environment.default_environment_name': 'ROUGAILCLI', 'environment.default_environment_name': 'ROUGAILCLI',
@ -54,9 +53,6 @@ def _main():
parser.parse_args() parser.parse_args()
cmd_config.property.remove("not_for_commandline") cmd_config.property.remove("not_for_commandline")
cmd_config.property.read_only() cmd_config.property.read_only()
if rougailconfig["upgrade"]:
RougailUpgrade(rougailconfig=rougailconfig).run()
return
try: try:
user_data_names = rougailconfig["step.user_data"] user_data_names = rougailconfig["step.user_data"]
except PropertiesOptionError: except PropertiesOptionError: