Fix XEP-0078 error handling
This commit is contained in:
parent
cf2c94d974
commit
9f6decdbc1
@ -78,8 +78,8 @@ class XEP_0078(BasePlugin):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
resp = iq.send(now=True)
|
resp = iq.send(now=True)
|
||||||
except IqError:
|
except IqError as err:
|
||||||
log.info("Authentication failed: %s", resp['error']['condition'])
|
log.info("Authentication failed: %s", err.iq['error']['condition'])
|
||||||
self.xmpp.event('failed_auth', direct=True)
|
self.xmpp.event('failed_auth', direct=True)
|
||||||
self.xmpp.disconnect()
|
self.xmpp.disconnect()
|
||||||
return True
|
return True
|
||||||
@ -120,12 +120,12 @@ class XEP_0078(BasePlugin):
|
|||||||
result = iq.send(now=True)
|
result = iq.send(now=True)
|
||||||
except IqError as err:
|
except IqError as err:
|
||||||
log.info("Authentication failed")
|
log.info("Authentication failed")
|
||||||
self.xmpp.disconnect()
|
|
||||||
self.xmpp.event("failed_auth", direct=True)
|
self.xmpp.event("failed_auth", direct=True)
|
||||||
|
self.xmpp.disconnect()
|
||||||
except IqTimeout:
|
except IqTimeout:
|
||||||
log.info("Authentication failed")
|
log.info("Authentication failed")
|
||||||
self.xmpp.disconnect()
|
|
||||||
self.xmpp.event("failed_auth", direct=True)
|
self.xmpp.event("failed_auth", direct=True)
|
||||||
|
self.xmpp.disconnect()
|
||||||
|
|
||||||
self.xmpp.features.add('auth')
|
self.xmpp.features.add('auth')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user