summaryrefslogtreecommitdiff
path: root/sleekxmpp/features/feature_mechanisms
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2014-08-17 17:20:26 -0700
committerLance Stout <lancestout@gmail.com>2014-08-17 17:20:26 -0700
commitca306e7cecee4bf7afd9ce44f5f067b305928682 (patch)
tree3641ff7754a221a53d6b5af08ffefa3f6898627d /sleekxmpp/features/feature_mechanisms
parenta5c03b763a6545a214f4f391f7c07582c22150b2 (diff)
parent1bf34f7fe694c2997710e0d23b0784e824df5e5e (diff)
downloadslixmpp-ca306e7cecee4bf7afd9ce44f5f067b305928682.tar.gz
slixmpp-ca306e7cecee4bf7afd9ce44f5f067b305928682.tar.bz2
slixmpp-ca306e7cecee4bf7afd9ce44f5f067b305928682.tar.xz
slixmpp-ca306e7cecee4bf7afd9ce44f5f067b305928682.zip
Merge pull request #310 from Mayflower/cleanup
Cleanup
Diffstat (limited to 'sleekxmpp/features/feature_mechanisms')
-rw-r--r--sleekxmpp/features/feature_mechanisms/mechanisms.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/sleekxmpp/features/feature_mechanisms/mechanisms.py b/sleekxmpp/features/feature_mechanisms/mechanisms.py
index 17ad5ed0..1d8f8798 100644
--- a/sleekxmpp/features/feature_mechanisms/mechanisms.py
+++ b/sleekxmpp/features/feature_mechanisms/mechanisms.py
@@ -187,14 +187,14 @@ class FeatureMechanisms(BasePlugin):
except sasl.SASLCancelled:
self.attempted_mechs.add(self.mech.name)
self._send_auth()
- except sasl.SASLFailed:
- self.attempted_mechs.add(self.mech.name)
- self._send_auth()
except sasl.SASLMutualAuthFailed:
log.error("Mutual authentication failed! " + \
"A security breach is possible.")
self.attempted_mechs.add(self.mech.name)
self.xmpp.disconnect()
+ except sasl.SASLFailed:
+ self.attempted_mechs.add(self.mech.name)
+ self._send_auth()
else:
resp.send(now=True)
@@ -207,13 +207,13 @@ class FeatureMechanisms(BasePlugin):
resp['value'] = self.mech.process(stanza['value'])
except sasl.SASLCancelled:
self.stanza.Abort(self.xmpp).send()
- except sasl.SASLFailed:
- self.stanza.Abort(self.xmpp).send()
except sasl.SASLMutualAuthFailed:
log.error("Mutual authentication failed! " + \
"A security breach is possible.")
self.attempted_mechs.add(self.mech.name)
self.xmpp.disconnect()
+ except sasl.SASLFailed:
+ self.stanza.Abort(self.xmpp).send()
else:
if resp.get_value() == '':
resp.del_value()