Show More
@@ -36,6 +36,7 b' if ispy3:' | |||||
36 | import functools |
|
36 | import functools | |
37 | import os |
|
37 | import os | |
38 | fsencode = os.fsencode |
|
38 | fsencode = os.fsencode | |
|
39 | fsdecode = os.fsdecode | |||
39 |
|
40 | |||
40 | def sysstr(s): |
|
41 | def sysstr(s): | |
41 | """Return a keyword str to be passed to Python functions such as |
|
42 | """Return a keyword str to be passed to Python functions such as | |
@@ -76,6 +77,11 b' else:' | |||||
76 | raise TypeError( |
|
77 | raise TypeError( | |
77 | "expect str, not %s" % type(filename).__name__) |
|
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 | stringio = io.StringIO |
|
85 | stringio = io.StringIO | |
80 | empty = _queue.Empty |
|
86 | empty = _queue.Empty | |
81 | queue = _queue.Queue |
|
87 | queue = _queue.Queue |
General Comments 0
You need to be logged in to leave comments.
Login now