diff options
author | tk0miya <i.tkomiya@gmail.com> | 2014-09-15 22:10:13 +0900 |
---|---|---|
committer | tk0miya <i.tkomiya@gmail.com> | 2014-09-15 22:10:13 +0900 |
commit | 873efc53580b04c4f4a6bfeb9d3164cbb2dfbb7b (patch) | |
tree | 709d738a5f3dda87003b280dae66cab196c371f1 /sphinx/util/pycompat.py | |
parent | c884bfacaba2c658eb6c96bbbd43a08a3700564f (diff) | |
download | sphinx-git-873efc53580b04c4f4a6bfeb9d3164cbb2dfbb7b.tar.gz |
Fix #1512 env.record_dependency crashes on multibyte directories
Diffstat (limited to 'sphinx/util/pycompat.py')
-rw-r--r-- | sphinx/util/pycompat.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sphinx/util/pycompat.py b/sphinx/util/pycompat.py index 17f8871e8..c4598142f 100644 --- a/sphinx/util/pycompat.py +++ b/sphinx/util/pycompat.py @@ -25,6 +25,8 @@ if sys.version_info >= (3, 0): bytes = bytes # prefix for Unicode strings u = '' + # getcwd function + from os import getcwd # StringIO/BytesIO classes from io import StringIO, BytesIO, TextIOWrapper # safely encode a string for printing to the terminal @@ -58,6 +60,7 @@ else: b = str bytes = str u = 'u' + from os import getcwdu as getcwd from StringIO import StringIO BytesIO = StringIO # no need to refactor on 2.x versions |