Logo Search packages:      
Sourcecode: xdeb version File versions  Download package

def config::TargetConfig::InitializeFromConfigs (   self,
  config_paths 
)

Parses the config paths, and extract the options for our arch & variant.

The config files are parsed in the order they are passed in.  If there are
duplicate entries, the last one wins.

TODO(ajwong): There should be a factory method to call this.

Args:
  config_paths: A sequence of path strings for config files to load.

Definition at line 127 of file config.py.

00127                                                :
    """Parses the config paths, and extract the options for our arch & variant.

    The config files are parsed in the order they are passed in.  If there are
    duplicate entries, the last one wins.

    TODO(ajwong): There should be a factory method to call this.

    Args:
      config_paths: A sequence of path strings for config files to load.
    """
    config = ConfigParser.SafeConfigParser({_PARENT_OPTION: '',
                                            'architecture': self._architecture,
                                            'variant': self._variant })

    self._default_configs_read = config.read(_DEFAULT_CONFIGS)

    self._configs_read = None
    if config_paths:
      self._configs_read = config.read(config_paths)
      if self._configs_read != config_paths:
        raise ConfigFileParseException(
            'Only read [%s] but expected to read [%s]' %
            (', '.join(self._configs_read), ', '.join(config_paths)))
    self._ProcessTargetConfigs(config)

    if config.has_section('Options'):
      for option in config.options('Options'):
        self._value_dict['options'][option] = config.get('Options', option)

  def _ProcessTargetConfigs(self, config):


Generated by  Doxygen 1.6.0   Back to index