From cfc88140d5fa4b9e626ddea1574bf91e386afe88 Mon Sep 17 00:00:00 2001 From: crouzet Date: Wed, 4 Sep 2019 12:00:39 +0200 Subject: [PATCH] sat #17357 : nouveau champ rm_products pour blacklister des produits dans une application --- commands/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/config.py b/commands/config.py index 8e34e6d..0e1c1a3 100644 --- a/commands/config.py +++ b/commands/config.py @@ -457,7 +457,6 @@ class ConfigManager: else: cfg['open_application'] = 'yes' - # ===================================================================== # Load product config files in PRODUCTS section products_cfg = src.pyconf.Config() @@ -520,6 +519,10 @@ class ConfigManager: for rule in self.get_command_line_overrides(options, ["USER"]): exec('cfg.' + rule) # this cannot be factorize because of the exec + # remove application products "blacklisted" in rm_products field + if "APPLICATION" in cfg and "rm_products" in cfg.APPLICATION: + for prod_to_remove in cfg.APPLICATION.rm_products: + cfg.APPLICATION.products.__delitem__(prod_to_remove) return cfg def set_user_config_file(self, config): -- 2.39.2