def gotMessage(self, stream, message):
        log.msg("Got XMPP message %s" % message.toXml())
        
        try:
            #TODO: do initial parsing, on <error> run errback
            d = stream._pending[message['id']]
            d.callback(message)
            
            del stream._pending[message['id']]
        except __HOLE__:
            # looks like it's event message from XMPP
            self.gotEvent(message)
dataset/ETHPy150Open selfsk/nodeset.core/src/nodeset/core/pubsub/agent.py/XmppAgent.gotMessage