summaryrefslogtreecommitdiff
path: root/sleekxmpp/util
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-08-10 12:41:29 -0700
committerLance Stout <lancestout@gmail.com>2012-08-10 12:41:29 -0700
commit230465b94637ff83cd40e8a2a2fe117d61d5fe79 (patch)
tree31116f3dc84493a61925dd4754eb1f7b0aaa12c8 /sleekxmpp/util
parentd11a67702e9f28fecbe4460f82b6c0ab0bdd740c (diff)
downloadslixmpp-230465b94637ff83cd40e8a2a2fe117d61d5fe79.tar.gz
slixmpp-230465b94637ff83cd40e8a2a2fe117d61d5fe79.tar.bz2
slixmpp-230465b94637ff83cd40e8a2a2fe117d61d5fe79.tar.xz
slixmpp-230465b94637ff83cd40e8a2a2fe117d61d5fe79.zip
Fix unicode conversion utility.
Diffstat (limited to 'sleekxmpp/util')
-rw-r--r--sleekxmpp/util/misc_ops.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sleekxmpp/util/misc_ops.py b/sleekxmpp/util/misc_ops.py
index 1dcc2b91..9bb1db4b 100644
--- a/sleekxmpp/util/misc_ops.py
+++ b/sleekxmpp/util/misc_ops.py
@@ -4,6 +4,8 @@ import hashlib
def unicode(text):
if sys.version_info < (3, 0):
+ if isinstance(text, str):
+ text = text.decode('utf-8')
import __builtin__
return __builtin__.unicode(text)
return str(text)