summaryrefslogtreecommitdiff
path: root/sleekxmpp/features/feature_mechanisms/stanza/auth.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/features/feature_mechanisms/stanza/auth.py')
-rw-r--r--sleekxmpp/features/feature_mechanisms/stanza/auth.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/sleekxmpp/features/feature_mechanisms/stanza/auth.py b/sleekxmpp/features/feature_mechanisms/stanza/auth.py
index 8b9d18b6..6b6f85a3 100644
--- a/sleekxmpp/features/feature_mechanisms/stanza/auth.py
+++ b/sleekxmpp/features/feature_mechanisms/stanza/auth.py
@@ -8,8 +8,7 @@
import base64
-from sleekxmpp.thirdparty.suelta.util import bytes
-
+from sleekxmpp.util import bytes
from sleekxmpp.xmlstream import StanzaBase
@@ -41,7 +40,7 @@ class Auth(StanzaBase):
if not self['mechanism'] in self.plain_mechs:
if values:
self.xml.text = bytes(base64.b64encode(values)).decode('utf-8')
- else:
+ elif values == b'':
self.xml.text = '='
else:
self.xml.text = bytes(values).decode('utf-8')