summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-12-27 18:03:08 -0500
committerLance Stout <lancestout@gmail.com>2011-12-27 18:03:08 -0500
commit522f0dac167717603f2b52c0e0c10389d9e41768 (patch)
treefa1f9f480be0b750221949b219f3a752e2673ebe /sleekxmpp
parent42a86fe0d407521ba23b21ba5d95fa2779186ddb (diff)
parentcd5ae944ec9756fb2f85fbb9a41261b7793b15ac (diff)
downloadslixmpp-522f0dac167717603f2b52c0e0c10389d9e41768.tar.gz
slixmpp-522f0dac167717603f2b52c0e0c10389d9e41768.tar.bz2
slixmpp-522f0dac167717603f2b52c0e0c10389d9e41768.tar.xz
slixmpp-522f0dac167717603f2b52c0e0c10389d9e41768.zip
Merge branch 'develop' of github.com:fritzy/SleekXMPP into develop
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/plugins/xep_0009/binding.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/sleekxmpp/plugins/xep_0009/binding.py b/sleekxmpp/plugins/xep_0009/binding.py
index 2c54b3b1..b4395707 100644
--- a/sleekxmpp/plugins/xep_0009/binding.py
+++ b/sleekxmpp/plugins/xep_0009/binding.py
@@ -111,10 +111,10 @@ def _xml2py(value):
if value.find('{%s}double' % namespace) is not None:
return float(value.find('{%s}double' % namespace).text)
if value.find('{%s}base64' % namespace) is not None:
- return rpcbase64(value.find('{%s}base64' % namespace).text)
+ return rpcbase64(value.find('{%s}base64' % namespace).text.encode())
if value.find('{%s}Base64' % namespace) is not None:
# Older versions of XEP-0009 used Base64
- return rpcbase64(value.find('{%s}Base64' % namespace).text)
+ return rpcbase64(value.find('{%s}Base64' % namespace).text.encode())
if value.find('{%s}dateTime.iso8601' % namespace) is not None:
return rpctime(value.find('{%s}dateTime.iso8601' % namespace).text)
if value.find('{%s}struct' % namespace) is not None:
@@ -138,13 +138,13 @@ class rpcbase64(object):
self.data = data
def decode(self):
- return base64.decodestring(self.data)
+ return base64.b64decode(self.data)
def __str__(self):
- return self.decode()
+ return self.decode().decode()
def encoded(self):
- return self.data
+ return self.data.decode()