From a0c77c04a5d7185fe01729961d05eccdba4d37e7 Mon Sep 17 00:00:00 2001 From: Anton Ryzhov Date: Thu, 28 Mar 2013 21:52:18 +0400 Subject: [PATCH] XMLStream `proxy_error` event duplicated with `connection_failed` SASL `no_auth` event duplicated with `failed_auth` --- sleekxmpp/features/feature_mechanisms/mechanisms.py | 1 + sleekxmpp/xmlstream/xmlstream.py | 1 + 2 files changed, 2 insertions(+) diff --git a/sleekxmpp/features/feature_mechanisms/mechanisms.py b/sleekxmpp/features/feature_mechanisms/mechanisms.py index eb161be8..2ed3e00b 100644 --- a/sleekxmpp/features/feature_mechanisms/mechanisms.py +++ b/sleekxmpp/features/feature_mechanisms/mechanisms.py @@ -171,6 +171,7 @@ class FeatureMechanisms(BasePlugin): except sasl.SASLNoAppropriateMechanism: log.error("No appropriate login method.") self.xmpp.event("no_auth", direct=True) + self.xmpp.event("failed_auth", direct=True) self.attempted_mechs = set() return self.xmpp.disconnect() except StringPrepError: diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index e55e78e7..f9a9c5a5 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -610,6 +610,7 @@ class XMLStream(object): lines = resp.split('\r\n') if '200' not in lines[0]: self.event('proxy_error', resp) + self.event('connection_failed', direct=True) log.error('Proxy Error: %s', lines[0]) return False