From 45d75d903722fdd81a492696ada9f37668d17753 Mon Sep 17 00:00:00 2001 From: crouzet Date: Wed, 23 Jan 2019 10:26:02 +0100 Subject: [PATCH] =?utf8?q?sat=20#8897=20:=20prise=20en=20compte=20du=20cas?= =?utf8?q?=20overwrite=20o=C3=B9=20version=20est=20un=20dictionnaire?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/product.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/product.py b/src/product.py index 5ecd58b..31f8658 100644 --- a/src/product.py +++ b/src/product.py @@ -104,6 +104,41 @@ def get_product_config(config, product_name, with_install_dir=True): if 'section' in dic_version: section = dic_version.section + # this case occur when version is overwritten, cf sat # 8897 + if isinstance(version, dict): + dic_version = version + # Get the version/tag + if not 'tag' in dic_version: + version = config.APPLICATION.tag + else: + version = dic_version["tag"] + + # Get the debug if any + if 'debug' in dic_version: + debug = dic_version["debug"] + elif 'debug' in config.APPLICATION: + debug = config.APPLICATION.debug + + # Get the verbose if any + if 'verbose' in dic_version: + verbose = dic_version["verbose"] + elif 'verbose' in config.APPLICATION: + verbose = config.APPLICATION.verbose + + # Get the dev if any + if 'dev' in dic_version: + dev = dic_version["dev"] + elif 'dev' in config.APPLICATION: + dev = config.APPLICATION.dev + + # Get the base if any + if 'base' in dic_version: + base = dic_version["base"] + + # Get the section if any + if 'section' in dic_version: + section = dic_version['section'] + vv = version # substitute some character with _ in order to get the correct definition # in config.PRODUCTS. This is done because the pyconf tool does not handle -- 2.39.2