(self, file_path)
Loads a YAML config file describing the log file config.

        This function reads a YAML config file, and adds the config
        to it's config data. This configuration can then be used to
        setup an import streamer object.

        Args:
            file_path (str): the path to the config file.

        Raises:
            ValueError: if the file path does not exist or if the config
                        is not valid or cannot be read.
Loads a YAML config file describing the log file config.
Loads a YAML config file describing the log file config .
def add_config(self, file_path):
        """Loads a YAML config file describing the log file config.

        This function reads a YAML config file, and adds the config
        to it's config data. This configuration can then be used to
        setup an import streamer object.

        Args:
            file_path (str): the path to the config file.

        Raises:
            ValueError: if the file path does not exist or if the config
                        is not valid or cannot be read.
        """
        if not os.path.isfile(file_path):
            raise ValueError(
                'Unable to open file: [{0:s}], it does not exist.'.format(
                    file_path))

        if not os.access(file_path, os.R_OK):
            raise ValueError(
                'Unable to open file: [{0:s}], cannot open it for '
                'read, please check permissions.'.format(file_path))


        config = data_config.load_config(file_path)
        if not isinstance(config, dict):
            raise ValueError(
                'Unable to read config file since it does not produce a dict')

        if not all([isinstance(x, dict) for x in config.values()]):
            raise ValueError(
                'The config needs to a dict that contains other dict '
                'attributes.')

        self._data.update(config)
def add_config ( self , file_path ) : if not os . path . isfile ( file_path ) : raise ValueError ( 'Unable to open file: [{0:s}], it does not exist.' . format ( file_path ) ) if not os . access ( file_path , os . R_OK ) : raise ValueError ( 'Unable to open file: [{0:s}], cannot open it for ' 'read, please check permissions.' . format ( file_path ) ) config = data_config . load_config ( file_path ) if not isinstance ( config , dict ) : raise ValueError ( 'Unable to read config file since it does not produce a dict' ) if not all ( [ isinstance ( x , dict ) for x in config . values ( ) ] ) : raise ValueError ( 'The config needs to a dict that contains other dict ' 'attributes.' ) self . _data . update ( config )