Refactor a bit and force unicode in some places and use an appropriate function name for it

This commit is contained in:
Dave Halter committed 2017-12-24 04:05:02 +01:00
1 parent 96a4fd7bd6
commit 4a366ab728
2 files changed
+16 -4

No files matched your search

+6
View File
@@ -245,6 +245,12 @@ def cast_path(obj):
return u(obj, errors='replace')
def force_unicode(obj):
# Intentionally don't mix those two up, because those two code paths might
# be different in the future (maybe windows?).
return cast_path(obj)
try:
import builtins # module name in python 3
except ImportError: