From 880d137743763f108c512b2bea43c0244373faf0 Mon Sep 17 00:00:00 2001 From: crouzet Date: Wed, 20 Feb 2019 11:59:32 +0100 Subject: [PATCH] petit bug sur les chemins relatifs dans data/local.pyconf --- commands/config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/config.py b/commands/config.py index 2590ad2..25d61d2 100644 --- a/commands/config.py +++ b/commands/config.py @@ -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: -- 2.39.2