def open_config_file(config_file):
    try:
        return open(config_file)
    except IOError, 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
Opens a config file, logging common IOError exceptions.
dataset/ETHPy150Open cloudtools/nymms/nymms/config/yaml_config.py/open_config_file