- # Get the modules to be prepared, regarding the options
- if options.modules is None:
- # No options, get all modules sources
- modules = runner.cfg.APPLICATION.modules
- else:
- # if option --modules, check that all modules of the command line
- # are present in the application.
- modules = options.modules
- for m in modules:
- if m not in runner.cfg.APPLICATION.modules:
- raise src.SatException(_("Module %(module)s "
- "not defined in application %(application)s") %
- { 'module': m, 'application': runner.cfg.VARS.application} )
-
- # Construct the list of tuple containing
- # the modules name and their definition
- modules_infos = src.module.get_modules_infos(modules, runner.cfg)
-
- # if the --no_sample option is invoked, suppress the sample modules from
- # the list
- if options.no_sample:
- modules_infos = filter(lambda l: not src.module.module_is_sample(l[1]),
- modules_infos)
+ # Get the products list with products informations regarding the options
+ products_infos = prepare.get_products_list(options, runner.cfg, logger)