(pkt)
return error
Parse an error message
Parse an error message
Parse an error message
def parse_error(pkt):
    """Parse an error message"""
    elen = endian_int(pkt[1:5])

    pkt = pkt[20:]
    error = ''
    for idx in xrange(elen - 20):
        tmp = pkt[idx]
        if tmp == '00':
            break
        error += tmp.decode('hex')
    return error
def parse_error ( pkt ) : elen = endian_int ( pkt [ 1 : 5 ] ) pkt = pkt [ 20 : ] error = '' for idx in xrange ( elen - 20 ) : tmp = pkt [ idx ] if tmp == '00' : break error += tmp . decode ( 'hex' ) return error