Find the last line in sent_data that can be parsed with parse_requestline

def last_requestline(sent_data):
    """
    Find the last line in sent_data that can be parsed with parse_requestline
    """
    for line in reversed(sent_data):
        try:
            parse_requestline(decode_utf8(line))
        except ValueError:
            pass
        else:
            return line