Cleanup some code and a small Python 2 fix.

This commit is contained in:
Dave Halter
2016-12-17 16:42:52 +01:00
parent 75e09baee9
commit 1ef507e5e6
2 changed files with 9 additions and 91 deletions
+2 -1
View File
@@ -205,7 +205,8 @@ def u(string):
"""
if is_py3:
return str(string)
elif not isinstance(string, unicode):
if not isinstance(string, unicode):
return unicode(str(string), 'UTF-8')
return string