def streamErrorHandler(self,conn,error):
        name,text='error',error.getData()
        for tag in error.getChildren():
            if tag.getNamespace()==NS_XMPP_STREAMS:
                if tag.getName()=='text': text=tag.getData()
                else: name=tag.getName()
        if name in stream_exceptions.keys(): exc=stream_exceptions[name]
        else: exc=StreamError
        raise exc((name,text))
dataset/ETHPy150Open CouchPotato/CouchPotatoServer/libs/xmpp/dispatcher.py/Dispatcher.streamErrorHandler/original