summaryrefslogtreecommitdiff
path: root/sleekxmpp/thirdparty/suelta/sasl.py
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2011-08-12 16:36:03 -0700
committerNathan Fritz <fritzy@netflint.net>2011-08-12 16:36:03 -0700
commit8f1d0e7a79b662e5f2849cea6e73716cc887e226 (patch)
treeec2fe16b50effd4ba5787a57de00c514fad4f333 /sleekxmpp/thirdparty/suelta/sasl.py
parent88184ff9556774b1be3dc7fcb97f1f71803d2d61 (diff)
parent9b7ed73f95145f88887d6fc3daa1bd2a9596b943 (diff)
downloadslixmpp-8f1d0e7a79b662e5f2849cea6e73716cc887e226.tar.gz
slixmpp-8f1d0e7a79b662e5f2849cea6e73716cc887e226.tar.bz2
slixmpp-8f1d0e7a79b662e5f2849cea6e73716cc887e226.tar.xz
slixmpp-8f1d0e7a79b662e5f2849cea6e73716cc887e226.zip
Merge branch 'develop' of github.com:fritzy/SleekXMPP into develop
Diffstat (limited to 'sleekxmpp/thirdparty/suelta/sasl.py')
-rw-r--r--sleekxmpp/thirdparty/suelta/sasl.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sleekxmpp/thirdparty/suelta/sasl.py b/sleekxmpp/thirdparty/suelta/sasl.py
index ec7afe9d..2ae9ae61 100644
--- a/sleekxmpp/thirdparty/suelta/sasl.py
+++ b/sleekxmpp/thirdparty/suelta/sasl.py
@@ -225,7 +225,7 @@ class SASL(object):
requested_mech = 'ANONYMOUS'
else:
requested_mech = self.mech
- if requested_mech == '*' and self.user == 'anonymous':
+ if requested_mech == '*' and self.user in ['', 'anonymous', None]:
requested_mech = 'ANONYMOUS'
# If a specific mechanism was requested, try it
@@ -243,7 +243,7 @@ class SASL(object):
if MECH_SEC_SCORES[name] > best_score:
best_score = MECH_SEC_SCORES[name]
best_mech = name
- if best_mech != None:
+ if best_mech is not None:
best_mech = MECHANISMS[best_mech](self, best_mech)
return best_mech