diff options
author | Robin Gloster <robin@loc-com.de> | 2014-08-18 00:52:24 +0200 |
---|---|---|
committer | Robin Gloster <robin@loc-com.de> | 2014-08-23 12:47:29 +0200 |
commit | afc939708ff71e168f9204f1eab8823b7dc9f875 (patch) | |
tree | 255d2c159d1b0b31ae7b1322d802a9fb4770f23b /sleekxmpp/features/feature_mechanisms | |
parent | aabec8b993748866b9cf3f09ebb7ae7ce2ddc426 (diff) | |
download | slixmpp-afc939708ff71e168f9204f1eab8823b7dc9f875.tar.gz slixmpp-afc939708ff71e168f9204f1eab8823b7dc9f875.tar.bz2 slixmpp-afc939708ff71e168f9204f1eab8823b7dc9f875.tar.xz slixmpp-afc939708ff71e168f9204f1eab8823b7dc9f875.zip |
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 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() |