Salome HOME
correction bug spns #16713
[tools/sat.git] / commands / config.py
index 2590ad2cab07369331c97fd6ad026db0f4fc9f63..3df71fec024b518f2ea0ac060baca3d86fd475df 100644 (file)
@@ -162,8 +162,8 @@ class ConfigManager:
         
         # set platform parameters
         dist_name = src.architecture.get_distribution(codes=distrib_cfg.DISTRIBUTIONS)
-        dist_version = src.architecture.get_distrib_version(dist_name,  codes=distrib_cfg.VERSIONS)
-        dist_version_full = src.architecture.get_infosys()
+        dist_version = src.architecture.get_distrib_version(dist_name)
+        dist_version_full = src.architecture.get_version_XY()
         dist = dist_name + dist_version
         
         var['dist_name'] = dist_name
@@ -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: