]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
petit bug sur les chemins relatifs dans data/local.pyconf V9_2_1
authorcrouzet <nicolas.crouzet@cea.fr>
Wed, 20 Feb 2019 10:59:32 +0000 (11:59 +0100)
committercrouzet <nicolas.crouzet@cea.fr>
Wed, 20 Feb 2019 10:59:32 +0000 (11:59 +0100)
commands/config.py

index 2590ad2cab07369331c97fd6ad026db0f4fc9f63..25d61d24bd6c53c52223170b40087c8a6417bccc 100644 (file)
@@ -320,6 +320,10 @@ class ConfigManager:
                                 "The projects definition\n")
         
         for project_pyconf_path in cfg.PROJECTS.project_file_paths:
+            if not os.path.isabs(project_pyconf_path):
+                # for a relative path (archive case) we complete with sat path
+                project_pyconf_path = os.path.join(cfg.VARS.salometoolsway,
+                                                  project_pyconf_path)
             if not os.path.exists(project_pyconf_path):
                 msg = _("WARNING: The project file %s cannot be found. "
                         "It will be ignored\n" % project_pyconf_path)
@@ -329,10 +333,6 @@ class ConfigManager:
                                     project_pyconf_path)[:-len(".pyconf")]
             try:
                 project_pyconf_dir = os.path.dirname(project_pyconf_path)
-                if not os.path.isabs(project_pyconf_dir):
-                    # for a relative path (archive case) we complete with sat path
-                    project_pyconf_dir = os.path.join(cfg.VARS.salometoolsway,
-                                                      project_pyconf_dir)
                 project_cfg = src.pyconf.Config(open(project_pyconf_path),
                                                 PWD=("", project_pyconf_dir))
             except Exception as e: