summaryrefslogtreecommitdiff
path: root/sleekxmpp/features
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-05-14 23:12:54 -0700
committerLance Stout <lancestout@gmail.com>2012-05-14 23:12:54 -0700
commitf5beac2afafeab1f1a788d1409b61834b124469c (patch)
tree98a8a4ee16a4fc3d64422f506904b12d8ada2c67 /sleekxmpp/features
parent8a23f28dfa3ac6b97d35cb81bb071cd2802271e8 (diff)
downloadslixmpp-f5beac2afafeab1f1a788d1409b61834b124469c.tar.gz
slixmpp-f5beac2afafeab1f1a788d1409b61834b124469c.tar.bz2
slixmpp-f5beac2afafeab1f1a788d1409b61834b124469c.tar.xz
slixmpp-f5beac2afafeab1f1a788d1409b61834b124469c.zip
Use SASLPrepFailure as the exception name instead of UnicodeError.
Diffstat (limited to 'sleekxmpp/features')
-rw-r--r--sleekxmpp/features/feature_mechanisms/mechanisms.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sleekxmpp/features/feature_mechanisms/mechanisms.py b/sleekxmpp/features/feature_mechanisms/mechanisms.py
index cc3579e8..f47012a9 100644
--- a/sleekxmpp/features/feature_mechanisms/mechanisms.py
+++ b/sleekxmpp/features/feature_mechanisms/mechanisms.py
@@ -10,6 +10,7 @@ import logging
from sleekxmpp.thirdparty import suelta
from sleekxmpp.thirdparty.suelta.exceptions import SASLCancelled, SASLError
+from sleekxmpp.thirdparty.suelta.exceptions import SASLPrepFailure
from sleekxmpp.stanza import StreamFeatures
from sleekxmpp.xmlstream import RestartStream, register_stanza_plugin
@@ -129,7 +130,7 @@ class FeatureMechanisms(BasePlugin):
except SASLError:
self.attempted_mechs.add(self.mech.name)
self._send_auth()
- except UnicodeError as e:
+ except SASLPrepFailure:
log.exception("A credential value did not pass SASLprep.")
self.xmpp.disconnect()
else: