def open_config_file(config_file):
    """ Opens a config file, logging common IOError exceptions.
    """
    try:
        return open(config_file)
    except __HOLE__, e:
        # This should only happen with the top level config file, since
        # we use glob.glob on includes
        if e.errno == 2:
            logger.error("Could not find file '%s'.", config_file)
        elif e.errno == 13:
            logger.error("Invalid permissions to open '%s'.", config_file)
        raise
dataset/ETHPy150Open cloudtools/nymms/nymms/config/yaml_config.py/open_config_file