From 01d174874aba86ab5de1e29af833b3a0f4ab4cc8 Mon Sep 17 00:00:00 2001 From: crouzet Date: Thu, 8 Mar 2018 16:58:53 +0100 Subject: [PATCH] sat #10567 : suppression doublon product_is_salome --- commands/application.py | 2 +- src/product.py | 24 +++++------------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/commands/application.py b/commands/application.py index 55d2d30..4a0d9b9 100644 --- a/commands/application.py +++ b/commands/application.py @@ -247,7 +247,7 @@ def get_SALOME_modules(config): l_modules = [] for product in config.APPLICATION.products: product_info = src.product.get_product_config(config, product) - if (src.product.product_is_SALOME(product_info) or + if (src.product.product_is_salome(product_info) or src.product.product_is_generated(product_info)): l_modules.append(product) return l_modules diff --git a/src/product.py b/src/product.py index b1c62eb..6f5b28a 100644 --- a/src/product.py +++ b/src/product.py @@ -549,18 +549,16 @@ def product_is_sample(product_info): return False def product_is_salome(product_info): - '''Know if a product is of type salome + '''Know if a product is a SALOME module :param product_info Config: The configuration specific to the product - :return: True if the product is salome, else False + :return: True if the product is a SALOME module, else False :rtype: boolean ''' - if 'type' in product_info: - ptype = product_info.type - return ptype.lower() == 'salome' - else: - return False + return ("properties" in product_info and + "is_SALOME_module" in product_info.properties and + product_info.properties.is_SALOME_module == "yes") def product_is_fixed(product_info): '''Know if a product is fixed @@ -638,18 +636,6 @@ def product_is_vcs(product_info): ''' return product_info.get_source in AVAILABLE_VCS -def product_is_SALOME(product_info): - '''Know if a product is a SALOME module - - :param product_info Config: The configuration specific to - the product - :return: True if the product is a SALOME module, else False - :rtype: boolean - ''' - return ("properties" in product_info and - "is_SALOME_module" in product_info.properties and - product_info.properties.is_SALOME_module == "yes") - def product_is_smesh_plugin(product_info): '''Know if a product is a SMESH plugin -- 2.39.2