def METHOD_NAME(self, data):
    m = re.match("(.*)\t(.*)\n", to_unicode(data))
    if m is None:
        raise Exception("did not match")
    status, message = m.groups()
    if status == "ok":
        return message
    else:
        raise CapError(message)