From: crouzet Date: Wed, 23 Jan 2019 09:26:02 +0000 (+0100) Subject: sat #8897 : prise en compte du cas overwrite où version est un dictionnaire X-Git-Tag: 5.3.0~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=45d75d903722fdd81a492696ada9f37668d17753;p=tools%2Fsat.git sat #8897 : prise en compte du cas overwrite où version est un dictionnaire --- 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