Fix logging of SASL errors.
This commit is contained in:
parent
8009b0485e
commit
bc8b5774ac
@ -11,11 +11,15 @@
|
|||||||
:license: MIT, see LICENSE for more details
|
:license: MIT, see LICENSE for more details
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import logging
|
||||||
import stringprep
|
import stringprep
|
||||||
|
|
||||||
from sleekxmpp.util import hashes, bytes, stringprep_profiles
|
from sleekxmpp.util import hashes, bytes, stringprep_profiles
|
||||||
|
|
||||||
|
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
#: Global registry mapping mechanism names to implementation classes.
|
#: Global registry mapping mechanism names to implementation classes.
|
||||||
MECHANISMS = {}
|
MECHANISMS = {}
|
||||||
|
|
||||||
@ -157,7 +161,7 @@ def choose(mech_list, credentials, security_settings, limit=None, min_mech=None)
|
|||||||
|
|
||||||
return mech_class(best_mech, creds, security_opts)
|
return mech_class(best_mech, creds, security_opts)
|
||||||
except SASLCancelled as e:
|
except SASLCancelled as e:
|
||||||
log.debug('SASL: %s: %s', (best_mech, e.message))
|
log.info('SASL: %s: %s', best_mech, e.message)
|
||||||
mech_list.remove(best_mech)
|
mech_list.remove(best_mech)
|
||||||
return choose(mech_list, credentials, security_settings,
|
return choose(mech_list, credentials, security_settings,
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
Loading…
Reference in New Issue
Block a user