summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp')
-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)