コード例 #1
0
    def load_initial_config(self, config, global_config=None):
        config_spec = self.config_spec
        config_copy = copy.deepcopy(config)
        
        # Apply defaults, then globals, then new config values

        # Defaults
        new_config = mureilbuilder.collect_defaults(config_spec)
        
        # Globals
        if global_config:
            mureilbuilder.update_with_globals(new_config, global_config,
                config_spec)

        # New config values
        new_config.update(config_copy)

        # Apply conversions to config
        mureilbuilder.apply_conversions(new_config, config_spec)

        # And check that all of the required parameters are there
        mureilbuilder.check_required_params(new_config, config_spec)

        self.config = new_config
        return
コード例 #2
0
    def load_initial_config(self, config, global_config=None):
        config_spec = self.config_spec
        config_copy = copy.deepcopy(config)

        # Apply defaults, then globals, then new config values

        # Defaults
        new_config = mureilbuilder.collect_defaults(config_spec)

        # Globals
        if global_config:
            mureilbuilder.update_with_globals(new_config, global_config,
                                              config_spec)

        # New config values
        new_config.update(config_copy)

        # Apply conversions to config
        mureilbuilder.apply_conversions(new_config, config_spec)

        # And check that all of the required parameters are there
        mureilbuilder.check_required_params(new_config, config_spec)

        self.config = new_config
        return
コード例 #3
0
    def check_config(self):
        """Final check that all requested parameters are present, and that there are no
        extras.
        """
        
        # And check that all of the required parameters are there
        mureilbuilder.check_required_params(self.config, self.config_spec)

        # And check that there aren't any extras
        mureilbuilder.check_for_extras(self.config, self.config_spec)
コード例 #4
0
    def check_config(self):
        """Final check that all requested parameters are present, and that there are no
        extras.
        """

        # And check that all of the required parameters are there
        mureilbuilder.check_required_params(self.config, self.config_spec)

        # And check that there aren't any extras
        mureilbuilder.check_for_extras(self.config, self.config_spec)