X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=commands%2Fconfig.py;h=6be16dba9fb0617ab1c41d3c8a9bc5efb3f9181e;hb=65e669163253ca6ec0fc6aa3d3ad97a37866e407;hp=c089074dc8fec98974bbd2959041db698cde0fd6;hpb=1136b600d92b4193c208c061fc8db0182d58e526;p=tools%2Fsat.git diff --git a/commands/config.py b/commands/config.py index c089074..6be16db 100644 --- a/commands/config.py +++ b/commands/config.py @@ -527,6 +527,8 @@ class ConfigManager: 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) + # remove rm_products section after usage + cfg.APPLICATION.__delitem__("rm_products") return cfg def set_user_config_file(self, config): @@ -810,18 +812,23 @@ def show_properties(config, logger): :param config Config: the global configuration. :param logger Logger: The logger instance to use for the display ''' + if "properties" in config.APPLICATION: + # some properties are defined at application level, we display them + logger.write("Application properties:\n", 1) + for prop in config.APPLICATION.properties: + logger.write(src.printcolors.printcInfo(" %s : %s\n" % (prop, config.APPLICATION.properties[prop])), 1) oneOrMore = False for product in sorted(config.APPLICATION.products): try: product_info = src.product.get_product_config(config, product) done = False try: - for i in product_info.properties: + for prop in product_info.properties: if not done: logger.write("%s:\n" % product, 1) done = True oneOrMore = True - logger.write(src.printcolors.printcInfo(" %s\n" % i), 1) + logger.write(src.printcolors.printcInfo(" %s : %s\n" % (prop, product_info.properties[prop])), 1) except Exception as e: pass except Exception as e: @@ -1131,6 +1138,7 @@ def run(args, runner, logger): # case : give a synthetic view of all patches used in the application if options.show_properties: src.check_config_has_application(runner.cfg) + # Print some informations logger.write(_('Properties of application %s\n') % src.printcolors.printcLabel(runner.cfg.VARS.application), 3)