def parseClientUnrouteableMessage(self, msg, channel, queue, thriftClient,
                                      iprot_factory=None):
        tr = TTransport.TMemoryBuffer(msg.content.body)
        if iprot_factory is None:
            iprot = self.factory.iprot_factory.getProtocol(tr)
        else:
            iprot = iprot_factory.getProtocol(tr)
        (fname, mtype, rseqid) = iprot.readMessageBegin()

        # log.msg('Got unroutable. fname = %r, rseqid = %s, mtype = %r, routing key = %r, client = %r, msg.content.body = %r' % (fname, rseqid, mtype, msg.routing_key, thriftClient, msg.content.body))

        try:
            d = thriftClient._reqs.pop(rseqid)
        except __HOLE__:
            # KeyError will occur if the remote Thrift method is oneway,
            # since there is no outstanding local request deferred for
            # oneway calls.
            pass
        else:
            d.errback(TTransport.TTransportException(
                type=TTransport.TTransportException.NOT_OPEN,
                message='Unrouteable message, routing key = %r calling function %r'
                % (msg.routing_key, fname)))

        d = queue.get()
        d.addCallback(self.parseClientUnrouteableMessage, channel, queue,
            thriftClient, iprot_factory=iprot_factory)
        d.addErrback(self.catchClosedClientQueue)
        d.addErrback(self.handleClientQueueError)
dataset/ETHPy150Open tweetdeck/txAMQP/src/txamqp/contrib/thrift/protocol.py/ThriftAMQClient.parseClientUnrouteableMessage