(self, remaining)
return conf_dict
Find the correct config file and read it.
Find the correct config file and read it.
Find the correct config file and read it .
def _parse_config_arg_and_process_config_file(self, remaining):
        """Find the correct config file and read it."""
        # always read default config files; private config overrides system config
        # we update a whole preset at once, there's no joining of settings.
        conf_dict = PRESETS.copy()
        conf_dict.update(self._read_config_file(USER_CONFIG_PATH))
        # find any local overriding config file & read it
        config_file = None
        try:
            config_file = remaining.pop(u'config')
        except KeyError:
            if os.path.exists(CONFIG_NAME):
                config_file = CONFIG_NAME
        if config_file:
            conf_dict.update(self._read_config_file(config_file))
        return conf_dict
def _parse_config_arg_and_process_config_file ( self , remaining ) : # always read default config files; private config overrides system config # we update a whole preset at once, there's no joining of settings. conf_dict = PRESETS . copy ( ) conf_dict . update ( self . _read_config_file ( USER_CONFIG_PATH ) ) # find any local overriding config file & read it config_file = None try : config_file = remaining . pop ( u'config' ) except KeyError : if os . path . exists ( CONFIG_NAME ) : config_file = CONFIG_NAME if config_file : conf_dict . update ( self . _read_config_file ( config_file ) ) return conf_dict