(pkt)
return False
Check if the query response is an error
Check if the query response is an error
Check if the query response is an error
def is_error(pkt):
    """Check if the query response is an error"""
    code = endian_int(pkt[5:7])
    if code == 1064:
        # error in SQL query
        return True
    elif code == 1096:
        # no tables used
        return True
    return False
def is_error ( pkt ) : code = endian_int ( pkt [ 5 : 7 ] ) if code == 1064 : # error in SQL query return True elif code == 1096 : # no tables used return True return False