

def get_config_option(res_id, option, config_path):
    "\n    Retrieves an option in a configuration file.\n\n    @param res_id: the hypervisor's id corresponding to a section in the\n                    configuration file\n    @type res_id: str\n\n    @param option: the option to retrieve the value\n    @type option: str\n\n    @param config_path: the path to the configuration file\n    @type config_path: str\n    "
    config = read_config_file(config_path)
    if config.has_section(res_id):
        try:
            return config.get(res_id, option)
        except ConfigParser.NoOptionError:
            raise ResourceException(("The option '%s' doesn't exist in libvirt configuration file." % option))
    else:
        raise ResourceException(("The cloud manager '%s' doesn't exist in the configuration file." % option))

dataset/ETHPy150Open comodit/synapse-agent/custom_plugins/cloudmanagers-plugin/cm_util.py get_config_option/VarMisuse@77/286 `res_id`->`option`