From 0f775353f875c7313d5f16fbffff8491943775ec Mon Sep 17 00:00:00 2001 From: SRE Date: Thu, 6 Apr 2017 14:58:44 +0200 Subject: [PATCH] fix bug for overwriting products in the application pyconf --- commands/config.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/commands/config.py b/commands/config.py index d315df5..0efbfbd 100644 --- a/commands/config.py +++ b/commands/config.py @@ -387,20 +387,6 @@ class ConfigManager: " %s\n" % src.printcolors.printcWarning( str(e))) do_merge = False - - if do_merge: - merger.merge(cfg, application_cfg) - - # apply overwrite from command line if needed - for rule in self.get_command_line_overrides(options, - ["APPLICATION"]): - # this cannot be factorized because of the exec - exec('cfg.' + rule) - - # default launcher name ('salome') - if ('profile' in cfg.APPLICATION and - 'launcher_name' not in cfg.APPLICATION.profile): - cfg.APPLICATION.profile.launcher_name = 'salome' else: cfg['open_application'] = 'yes' @@ -413,7 +399,7 @@ class ConfigManager: "The products\n") if application is not None: src.pyconf.streamOpener = ConfigOpener(cfg.PATHS.PRODUCTPATH) - for product_name in cfg.APPLICATION.products.keys(): + for product_name in application_cfg.APPLICATION.products.keys(): # Loop on all files that are in softsDir directory # and read their config product_file_name = product_name + ".pyconf" @@ -439,6 +425,20 @@ class ConfigManager: for rule in self.get_command_line_overrides(options, ["PRODUCTS"]): exec('cfg.' + rule) # this cannot be factorized because of the exec + if do_merge: + merger.merge(cfg, application_cfg) + + # default launcher name ('salome') + if ('profile' in cfg.APPLICATION and + 'launcher_name' not in cfg.APPLICATION.profile): + cfg.APPLICATION.profile.launcher_name = 'salome' + + # apply overwrite from command line if needed + for rule in self.get_command_line_overrides(options, + ["APPLICATION"]): + # this cannot be factorized because of the exec + exec('cfg.' + rule) + # ===================================================================== # load USER config self.set_user_config_file(cfg) -- 2.39.2