From 148a23579c199d218325c88d7b6f567f42c7a36a Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Fri, 5 Aug 2011 14:06:58 -0700 Subject: Hotfix for ANONYMOUS mech support. Updates version to 1.0-Beta6.1 --- sleekxmpp/thirdparty/suelta/sasl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sleekxmpp/thirdparty/suelta/sasl.py') 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 -- cgit v1.2.3