From: Gbkng Date: Fri, 1 Mar 2024 17:29:44 +0000 (+0100) Subject: fix(config): revert a change about sat configuration which has nothing to do with... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=420a83bfa400da1bbb32a4a90c4c92da7f47417b;p=tools%2Fsat.git fix(config): revert a change about sat configuration which has nothing to do with the branch's feature cherry picking mistake. --- diff --git a/.gitignore b/.gitignore index 5d2f227..de154bf 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,4 @@ doc/src/commands/apidoc* __pycache__/ # IDE/editors/tools cache files -.vscode/ - -# cache file, generated by sat, to store configuration -data/local.pyconf +.vscode/ \ No newline at end of file diff --git a/commands/config.py b/commands/config.py index 803651d..24a95a8 100644 --- a/commands/config.py +++ b/commands/config.py @@ -22,7 +22,6 @@ import platform import datetime import shutil import gettext -from pathlib import Path import pprint as PP import src @@ -287,15 +286,9 @@ class ConfigManager: # Load LOCAL config file # search only in the data directory src.pyconf.streamOpener = ConfigOpener([cfg.VARS.datadir]) - - # if `local.pyconf` file is missing, create it from - # `local_original.pyconf` template file - localconf_path = osJoin(cfg.VARS.datadir, 'local.pyconf') - if not Path(localconf_path).is_file(): - shutil.copyfile(osJoin(cfg.VARS.datadir, 'local_original.pyconf'), localconf_path) - try: - local_cfg = src.pyconf.Config(open(localconf_path), + local_cfg = src.pyconf.Config(open( osJoin(cfg.VARS.datadir, + 'local.pyconf')), PWD = ('LOCAL', cfg.VARS.datadir) ) except src.pyconf.ConfigError as e: raise src.SatException(_("Error in configuration file: " diff --git a/data/local.pyconf b/data/local.pyconf new file mode 100644 index 0000000..eb81d5a --- /dev/null +++ b/data/local.pyconf @@ -0,0 +1,16 @@ + + LOCAL : + { + base : 'default' + workdir : 'default' + log_dir : 'default' + archive_dir : 'default' + VCS : 'unknown' + tag : 'unknown' + } + PROJECTS : + { + project_file_paths : + [ + ] + }