ability to specify multiple paths to configurations
488977
private void loadKiteConf(Services services) throws IOException {
    String[] paths = services.getConf().getStrings(KITE_CONFIGURATION);
    if (paths != null && paths.length != 0) {
      kiteConf = new Configuration(false);
      for(String path : paths) {
        if (path.startsWith("hdfs")) {
            Path p = new Path(path);
            HadoopAccessorService has = services.get(HadoopAccessorService.class);
            
            try {
                FileSystem fs = has.createFileSystem(
                        System.getProperty("user.name"), p.toUri(), has.createJobConf(p.toUri().getAuthority()));
                if (fs.exists(p)) {
                    FSDataInputStream is = null;
                    try {
                        is = fs.open(p);
                        Configuration partialConf = new XConfiguration(is);
                        kiteConf = merge(kiteConf, partialConf);
                    } finally {
                        if (is != null) {
                            is.close();
                        }
                    }
                    LOG.info("Loaded Kite Configuration: " + path);
                } else {
                    LOG.warn("Kite Configuration could not be found at [" + path + "]");
                }
            } catch (HadoopAccessorException hae) {
                throw new IOException(hae);
            }
        } else {
            File f = new File(path);
            if (f.exists()) {
                InputStream is = null;
                try {
                    is = new FileInputStream(f);
                    Configuration partialConf = new XConfiguration(is);
                    kiteConf = merge(kiteConf, partialConf);
                } finally {
                    if (is != null) {
                        is.close();
                    }
                }
                LOG.info("Loaded Kite Configuration: " + path);
            } else {
                LOG.warn("Kite Configuration could not be found at [" + path + "]");
            }
        }
      }
    } else {
      LOG.info("Kite Configuration not specified");
    }
  }
442613
def _ensure_paths_and_types(index: Dict[str, str]) -> Dict[str, Path]:
    
    configs_by_name = {ce.name: ce for ce in CONFIG_ELEMENTS}
    correct_types: Dict[str, Path] = {}
    for key, item in index.items():
        if key not in configs_by_name:  # old config, ignore
            continue
        if configs_by_name[key].kind == ConfigElementType.FILE:
            it = Path(item)
            it.parent.mkdir(parents=True, exist_ok=True)
            correct_types[key] = it
        elif configs_by_name[key].kind == ConfigElementType.DIR:
            it = Path(item)
            it.mkdir(parents=True, exist_ok=True)
            correct_types[key] = it
        else:
            raise RuntimeError(
                f"unhandled kind in ConfigElements: {key}: "
                f"{configs_by_name[key].kind}")
    return correct_types
690136
def config_maker(project_name, path):
    """"""

    with open(skeleton_path("config.py"), "r") as config_source:
        config_content = config_source.read()

    config_content = config_content.replace("__PROJECT_NAME__", project_name)

    with open(path, "w") as config_dest:
        config_dest.write(config_content)
1243370
function configuration(self, name) {
  if (!self.__configurations__[name]) {
    throw new Error('Unknown configuration: ' + name);
  }

  return self.__configurations__[name];
}
1116714
def _config_section(config, section):
    """"""
    path = os.path.join(config.get('config_path'), config.get('config_file'))
    conf = _config_ini(path)
    return conf.get(section)
763986
def _create_overrides_from_config(config):
    """"""
    d = {}
    for s in config.sections():
        d[s] = {}
        for opt in config.options(s):
            d[s][opt] = config.get(s, opt)
    return d
937695
def load_config(paths=DEFAULT_CONFIG_PATHS):
    
    config = Config()
    for path in paths:
        if os.path.isfile(path):
            config.load_pyfile(path)

    return config
396165
def set_config(path):
    
    logging.info("LOADING FROM: {}".format(path))
    session.config = load_config(path)
    return session.config
1148999
def MultiWritePathInfos(self, path_infos):
    """"""
    try:
      self._MultiWritePathInfos(path_infos)
    except MySQLdb.IntegrityError as error:
      client_ids = list(iterkeys(path_infos))
      raise db.AtLeastOneUnknownClientError(client_ids=client_ids, cause=error)
135249
function overrideConfig( path, value ) {
      beforeAll( () => {
         configurationOverrides[ path ] = value;
      } );
      afterAll( () => {
         delete configurationOverrides[ path ];
      } );
   }
140973
def configurations(self):
        """"""

        if self._confs is not None:
            return self._confs

        with output_capturing():
            module = self.load(self.fpath)
            confs = getattr(module, CONFIGS_MODULE_ATTR)
            confs = listify(confs)

        self._confs = confs

        return confs
596064
def _prepare_paths(self):
        
        if config.BASE in self.paths:
            for path in [path for path in self.paths if path != config.BASE]:
                if config.BASE_VARIABLE in self.paths[path]:
                    self.paths[path] = \
                        self.paths[path].replace(config.BASE_VARIABLE,
                                                 self.paths[config.BASE])
        LOGGER.debug('Prepared paths: %r', self.paths)
998384
def merge_path_config(configs, config_dir_override):
    
    config_dir = None
    log_dir = None
    data_dir = None
    key_dir = None
    policy_dir = None

    for config in reversed(configs):
        if config.config_dir is not None:
            config_dir = config.config_dir
        if config.log_dir is not None:
            log_dir = config.log_dir
        if config.data_dir is not None:
            data_dir = config.data_dir
        if config.key_dir is not None:
            key_dir = config.key_dir
        if config.policy_dir is not None:
            policy_dir = config.policy_dir

    if config_dir_override is not None:
        config_dir = config_dir_override

    return PathConfig(
        config_dir=config_dir,
        log_dir=log_dir,
        data_dir=data_dir,
        key_dir=key_dir,
        policy_dir=policy_dir)
12187
def __add_paths(self, config):
        
        bin_path = os.path.join(self.directory.install_directory(self.feature_name), 'bin')
        whitelist_executables = self._get_whitelisted_executables(config)
        for f in os.listdir(bin_path):
            for pattern in BLACKLISTED_EXECUTABLES:
                if re.match(pattern, f):
                    continue
            if whitelist_executables and f not in whitelist_executables:
                continue
            self.directory.symlink_to_bin(f, os.path.join(bin_path, f))
982063
def config_default(dest):
    
    conf_path = Path(dest).resolve()
    if conf_path.is_dir():
        conf_path = conf_path / LIGHTFLOW_CONFIG_NAME

    conf_path.write_text(Config.default())
    click.echo('Configuration written to {}'.format(conf_path))
833839
def _setup_config_from_kwargs(kwargs):
        """"""
        cmd_list = ['--json', '--force']

        if 'file' in kwargs:
            cmd_list.extend(['--file', kwargs['file']])

        if 'system' in kwargs:
            cmd_list.append('--system')

        return cmd_list
1045727
def config(host, seq, option, value):
    """"""
    at(host, 'CONFIG', seq, [str(option), str(value)])