summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0078
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-10-05 09:49:04 -0700
committerLance Stout <lancestout@gmail.com>2012-10-05 09:49:04 -0700
commit9f6decdbc1dbb791006e590906bd94021b71495f (patch)
tree99553aaa4f4525b051b391e6236961f3d6237b5e /sleekxmpp/plugins/xep_0078
parentcf2c94d974d193b6ba6387a2660c974c9c74f938 (diff)
downloadslixmpp-9f6decdbc1dbb791006e590906bd94021b71495f.tar.gz
slixmpp-9f6decdbc1dbb791006e590906bd94021b71495f.tar.bz2
slixmpp-9f6decdbc1dbb791006e590906bd94021b71495f.tar.xz
slixmpp-9f6decdbc1dbb791006e590906bd94021b71495f.zip
Fix XEP-0078 error handling
Diffstat (limited to 'sleekxmpp/plugins/xep_0078')
-rw-r--r--sleekxmpp/plugins/xep_0078/legacyauth.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sleekxmpp/plugins/xep_0078/legacyauth.py b/sleekxmpp/plugins/xep_0078/legacyauth.py
index 89716e18..be9fe3c5 100644
--- a/sleekxmpp/plugins/xep_0078/legacyauth.py
+++ b/sleekxmpp/plugins/xep_0078/legacyauth.py
@@ -78,8 +78,8 @@ class XEP_0078(BasePlugin):
try:
resp = iq.send(now=True)
- except IqError:
- log.info("Authentication failed: %s", resp['error']['condition'])
+ except IqError as err:
+ log.info("Authentication failed: %s", err.iq['error']['condition'])
self.xmpp.event('failed_auth', direct=True)
self.xmpp.disconnect()
return True
@@ -120,12 +120,12 @@ class XEP_0078(BasePlugin):
result = iq.send(now=True)
except IqError as err:
log.info("Authentication failed")
- self.xmpp.disconnect()
self.xmpp.event("failed_auth", direct=True)
+ self.xmpp.disconnect()
except IqTimeout:
log.info("Authentication failed")
- self.xmpp.disconnect()
self.xmpp.event("failed_auth", direct=True)
+ self.xmpp.disconnect()
self.xmpp.features.add('auth')