From 59ff08174fd83d4c1c2759be7d24011ccd7419d4 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Wed, 1 Aug 2012 17:43:38 -0700 Subject: [PATCH] Fix SASL exceptions in Py3 --- sleekxmpp/util/sasl/client.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sleekxmpp/util/sasl/client.py b/sleekxmpp/util/sasl/client.py index 36f8b7a7..0bfb63f8 100644 --- a/sleekxmpp/util/sasl/client.py +++ b/sleekxmpp/util/sasl/client.py @@ -79,19 +79,23 @@ def sasl_mech(score): class SASLNoAppropriateMechanism(Exception): - pass + def __init__(self, value=''): + self.message = value class SASLCancelled(Exception): - pass + def __init__(self, value=''): + self.message = value class SASLFailed(Exception): - pass + def __init__(self, value=''): + self.message = value class SASLMutualAuthFailed(SASLFailed): - pass + def __init__(self, value=''): + self.message = value class Mech(object):