fix a few debugging problems
This commit is contained in:
1 parent
a72601a9d8
commit
f93226420e
2 files changed
+4
-2
No files matched your search
@@ -168,6 +168,8 @@ def u(string):
|
||||
have to cast back to a unicode (and we now that we always deal with valid
|
||||
unicode, because we check that in the beginning).
|
||||
"""
|
||||
if not is_py3k and not isinstance(string, unicode):
|
||||
if is_py3k:
|
||||
return str(string)
|
||||
elif not isinstance(string, unicode):
|
||||
return unicode(str(string), 'UTF-8')
|
||||
return string
|
||||
Reference in new issue
Block a user