def read_config_file(file_name):
    config = ConfigParser.ConfigParser()

    try:
        ret = config.read(file_name)
        if not ret:
            raise ResourceException("The configuration file '%s' doesn't exist"
                                    % file_name)
    except ConfigParser.MissingSectionHeaderError:
        raise ResourceException("Couldn't parse configuration file '%s'" %
                                file_name)

    return config
    
#-----------------------------------------------------------------------------
Returns a parsed configuration file.
dataset/ETHPy150Open comodit/synapse-agent/custom_plugins/cloudmanagers-plugin/cm_util.py/read_config_file