##// END OF EJS Templates
py3: add os.fsdecode() as pycompat.fsdecode()...
Pulkit Goyal -
r30300:42af0590 default
parent child Browse files
Show More
@@ -36,6 +36,7 b' if ispy3:'
36 36 import functools
37 37 import os
38 38 fsencode = os.fsencode
39 fsdecode = os.fsdecode
39 40
40 41 def sysstr(s):
41 42 """Return a keyword str to be passed to Python functions such as
@@ -76,6 +77,11 b' else:'
76 77 raise TypeError(
77 78 "expect str, not %s" % type(filename).__name__)
78 79
80 # In Python 2, fsdecode() has a very chance to receive bytes. So it's
81 # better not to touch Python 2 part as it's already working fine.
82 def fsdecode(filename):
83 return filename
84
79 85 stringio = io.StringIO
80 86 empty = _queue.Empty
81 87 queue = _queue.Queue
General Comments 0
You need to be logged in to leave comments. Login now