def load_yaml(config_files):
    """Load the config files based on environment settings
    Will try to load the first file in the list that it can find.

    Args:
        config_files(list): A list of config files, in the order that they will
        be checked and loaded.

    Returns:
        A dict mapping of the yaml file.

    Raises:
        IOError: No config file can be successfully loaded or found.
    """
    for config_file in config_files:
        try:
            return yaml.load(open(config_file, 'r').read())
        except (__HOLE__, IOError):
            continue
    raise IOError('Dataduct config file is missing')
dataset/ETHPy150Open coursera/dataduct/dataduct/config/config.py/load_yaml