Refactor a bit and force unicode in some places and use an appropriate function name for it
This commit is contained in:
1 parent
96a4fd7bd6
commit
4a366ab728
2 files changed
+16
-4
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user