diff options
Diffstat (limited to 'src/common/xmpp/simplexml.py')
-rw-r--r-- | src/common/xmpp/simplexml.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/xmpp/simplexml.py b/src/common/xmpp/simplexml.py index 7458568e4..1abdbe881 100644 --- a/src/common/xmpp/simplexml.py +++ b/src/common/xmpp/simplexml.py @@ -27,7 +27,7 @@ def XMLescape(txt): ENCODING='utf-8' def ustr(what): """Converts object "what" to unicode string using it's own __str__ method if accessible or unicode method otherwise.""" - if type(what) == type(u''): return what + if isinstance(what, unicode): return what try: r=what.__str__() except AttributeError: r=str(what) if type(r)<>type(u''): return unicode(r,ENCODING) |