diff options
author | Lance Stout <lancestout@gmail.com> | 2014-08-18 13:34:15 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2014-08-18 13:34:15 -0700 |
commit | e5e2fbb16b4d9c11fc676925c6a13943282a3c66 (patch) | |
tree | 5dc018384ad03253608ff79c9fdbb577b84d2d2f /sleekxmpp/features/feature_mechanisms | |
parent | a20582aba4de85f5a193395df2d0ed8c75220bfb (diff) | |
parent | 3dd379cdf12d885e26f8ec26c54879a95d5f0b84 (diff) | |
download | slixmpp-e5e2fbb16b4d9c11fc676925c6a13943282a3c66.tar.gz slixmpp-e5e2fbb16b4d9c11fc676925c6a13943282a3c66.tar.bz2 slixmpp-e5e2fbb16b4d9c11fc676925c6a13943282a3c66.tar.xz slixmpp-e5e2fbb16b4d9c11fc676925c6a13943282a3c66.zip |
Merge pull request #311 from Mayflower/develop
Revert "cleanup semicolons, whitespace and mutable default arguments"
Diffstat (limited to 'sleekxmpp/features/feature_mechanisms')
-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 1d8f8798..17ad5ed0 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() |