summaryrefslogtreecommitdiff
path: root/sleekxmpp/features/feature_mechanisms/stanza/response.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/features/feature_mechanisms/stanza/response.py')
-rw-r--r--sleekxmpp/features/feature_mechanisms/stanza/response.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/sleekxmpp/features/feature_mechanisms/stanza/response.py b/sleekxmpp/features/feature_mechanisms/stanza/response.py
index 45bb8207..78636c9e 100644
--- a/sleekxmpp/features/feature_mechanisms/stanza/response.py
+++ b/sleekxmpp/features/feature_mechanisms/stanza/response.py
@@ -10,9 +10,7 @@ import base64
from sleekxmpp.thirdparty.suelta.util import bytes
-from sleekxmpp.stanza import StreamFeatures
-from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET
-from sleekxmpp.xmlstream import register_stanza_plugin
+from sleekxmpp.xmlstream import StanzaBase
class Response(StanzaBase):
@@ -33,7 +31,10 @@ class Response(StanzaBase):
return base64.b64decode(bytes(self.xml.text))
def set_value(self, values):
- self.xml.text = bytes(base64.b64encode(values)).decode('utf-8')
+ if values:
+ self.xml.text = bytes(base64.b64encode(values)).decode('utf-8')
+ else:
+ self.xml.text = '='
def del_value(self):
self.xml.text = ''