]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
fix(config): revert a change about sat configuration which has nothing to do with... gb262689/replace-bare-except-clause-with-except-exception 16/head
authorGbkng <guillaume.brooking@gmail.com>
Fri, 1 Mar 2024 17:29:44 +0000 (18:29 +0100)
committerGbkng <guillaume.brooking@gmail.com>
Fri, 1 Mar 2024 17:34:02 +0000 (18:34 +0100)
cherry picking mistake.

.gitignore
commands/config.py
data/local.pyconf [new file with mode: 0644]

index 5d2f22756a213de02b6e8d7ea881b45479c8a400..de154bf7a09956a0a81c7171419e1e2d079b49d0 100644 (file)
@@ -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
index 803651dd66f0f02cc1c3a3764e4d3f7fd0fb38e5..24a95a86d28ce25f05a20f7e3d9ec7396ab7c425 100644 (file)
@@ -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 (file)
index 0000000..eb81d5a
--- /dev/null
@@ -0,0 +1,16 @@
+  
+  LOCAL :
+  {
+    base : 'default'
+    workdir : 'default'
+    log_dir : 'default'
+    archive_dir : 'default'
+    VCS : 'unknown'
+    tag : 'unknown'
+  }
+  PROJECTS :
+  {
+    project_file_paths :
+    [
+    ]
+  }