diff options
author | Lance Stout <lancestout@gmail.com> | 2014-08-17 17:20:26 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2014-08-17 17:20:26 -0700 |
commit | ca306e7cecee4bf7afd9ce44f5f067b305928682 (patch) | |
tree | 3641ff7754a221a53d6b5af08ffefa3f6898627d /sleekxmpp/features | |
parent | a5c03b763a6545a214f4f391f7c07582c22150b2 (diff) | |
parent | 1bf34f7fe694c2997710e0d23b0784e824df5e5e (diff) | |
download | slixmpp-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')
-rw-r--r-- | sleekxmpp/features/feature_mechanisms/mechanisms.py | 10 |
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() |