summaryrefslogtreecommitdiff
path: root/sleekxmpp/thirdparty/suelta
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-08-05 14:08:32 -0700
committerLance Stout <lancestout@gmail.com>2011-08-05 14:08:32 -0700
commit6c4cb2bf00a047dbf5bf9f865c52f7c9703b24ae (patch)
treeea302d475b38c694bb147fb3e730ee488b3bf717 /sleekxmpp/thirdparty/suelta
parentea95811c4c76ae96bc41c4fab48886dd2e85c7a9 (diff)
parent148a23579c199d218325c88d7b6f567f42c7a36a (diff)
downloadslixmpp-6c4cb2bf00a047dbf5bf9f865c52f7c9703b24ae.tar.gz
slixmpp-6c4cb2bf00a047dbf5bf9f865c52f7c9703b24ae.tar.bz2
slixmpp-6c4cb2bf00a047dbf5bf9f865c52f7c9703b24ae.tar.xz
slixmpp-6c4cb2bf00a047dbf5bf9f865c52f7c9703b24ae.zip
Merge branch 'master' into develop
Adds hotfix for ANONYMOUS mech support. Conflicts: sleekxmpp/__init__.py
Diffstat (limited to 'sleekxmpp/thirdparty/suelta')
-rw-r--r--sleekxmpp/thirdparty/suelta/mechanisms/anonymous.py2
-rw-r--r--sleekxmpp/thirdparty/suelta/sasl.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/sleekxmpp/thirdparty/suelta/mechanisms/anonymous.py b/sleekxmpp/thirdparty/suelta/mechanisms/anonymous.py
index de89eef2..e44e91a2 100644
--- a/sleekxmpp/thirdparty/suelta/mechanisms/anonymous.py
+++ b/sleekxmpp/thirdparty/suelta/mechanisms/anonymous.py
@@ -10,7 +10,7 @@ class ANONYMOUS(Mechanism):
def __init__(self, sasl, name):
"""
"""
- super(ANONYMOUS, self).__init__(self, sasl, name, 0)
+ super(ANONYMOUS, self).__init__(sasl, name, 0)
def get_values(self):
"""
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