def registration_error(self, stanza):
        self.lock.acquire()
        try:
            err=stanza.get_error()
            ae=err.xpath_eval("e:*",{"e":"jabber:iq:auth:error"})
            if ae:
                ae=ae[0].name
            else:
                ae=err.get_condition().name
            raise RegistrationError("Authentication error condition: %s" % (ae,))
        finally:
            self.lock.release()
Handle in-band registration error.
dataset/ETHPy150Open kuri65536/python-for-android/python3-alpha/python-libs/pyxmpp2/ext/legacyauth.py/LegacyClientStream.registration_error