diff options
author | Nathan Fritz <fritzy@netflint.net> | 2011-08-12 16:36:03 -0700 |
---|---|---|
committer | Nathan Fritz <fritzy@netflint.net> | 2011-08-12 16:36:03 -0700 |
commit | 8f1d0e7a79b662e5f2849cea6e73716cc887e226 (patch) | |
tree | ec2fe16b50effd4ba5787a57de00c514fad4f333 /sleekxmpp/thirdparty/suelta | |
parent | 88184ff9556774b1be3dc7fcb97f1f71803d2d61 (diff) | |
parent | 9b7ed73f95145f88887d6fc3daa1bd2a9596b943 (diff) | |
download | slixmpp-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')
-rw-r--r-- | sleekxmpp/thirdparty/suelta/mechanisms/anonymous.py | 2 | ||||
-rw-r--r-- | sleekxmpp/thirdparty/suelta/sasl.py | 4 |
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 |