def onFailure(self, failure): self.xmlstream.removeObserver('/success', self.onSuccess) try: condition = failure.firstChildElement().name except AttributeError: condition = None self._deferred.errback(sasl.SASLAuthError(condition))
def onFailure(self, failure): failure.trap(error.UnauthorizedLogin) self.deferred.errback(sasl.SASLAuthError())