From: SRE Date: Thu, 6 Apr 2017 12:58:44 +0000 (+0200) Subject: fix bug for overwriting products in the application pyconf X-Git-Tag: V8_3_0rc1~27^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Foptimization;p=tools%2Fsat.git fix bug for overwriting products in the application pyconf --- 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)