From: crouzet Date: Wed, 16 Mar 2022 14:46:49 +0000 (+0100) Subject: small patch to allow to choose the complementary property X-Git-Tag: V9_9_0~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=434f140a0af96e21412c3cbe92508e7a302b002a;p=tools%2Fsat.git small patch to allow to choose the complementary property --- diff --git a/src/product.py b/src/product.py index 90879ea..290d382 100644 --- a/src/product.py +++ b/src/product.py @@ -797,15 +797,27 @@ def get_products_list(options, cfg, logger): ko = [] res =[] prop, value = options.properties # for example 'is_SALOME_module', 'yes' - for p_name, p_info in resAll: - try: - if p_info.properties[prop] == value: - res.append((p_name, p_info)) - ok.append(p_name) - else: - ko.append(p_name) - except: - ko.append(p_name) + if value[0] == '!': + for p_name, p_info in resAll: + try: + if p_info.properties[prop] == value[1:]: + ko.append(p_name) + else: + res.append((p_name, p_info)) + ok.append(p_name) + except: + res.append((p_name, p_info)) + ok.append(p_name) + else: + for p_name, p_info in resAll: + try: + if p_info.properties[prop] == value: + res.append((p_name, p_info)) + ok.append(p_name) + else: + ko.append(p_name) + except: + ko.append(p_name) if len(ok) != len(resAll): logger.trace("on properties %s\n products accepted:\n %s\n products rejected:\n %s\n" %