'A helper function to read a value from one of the state files.'

def _get_value_from_conf_file(self, kind, converter=None):

    file_name = self.get_conf_file_name(kind)
    msg = _('Error    while    reading    %s')
    try:
        with open(file_name, 'r') as f:
            try:
                return (converter(f.read()) if converter else f.read())
            except ValueError:
                msg = _('Unable    to    convert    value    in    %s')
    except IOError:
        msg = _('Unable    to    access    %s')
    LOG.debug(msg, file_name)
    return None
