summaryrefslogtreecommitdiff
path: root/sphinx/util/osutil.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-09-21 16:52:41 +0200
committerGeorg Brandl <georg@python.org>2014-09-21 16:52:41 +0200
commitc5dfd5c7328fe642d0ca2bb51be58253326af17f (patch)
treed9d8d787a291c5fe4bfb7601ab86d12f144abcd6 /sphinx/util/osutil.py
parent0511ced21ad95cef81223fae1291b7f02bb08e30 (diff)
downloadsphinx-git-c5dfd5c7328fe642d0ca2bb51be58253326af17f.tar.gz
Fix a few missing Unicode/bytes filename problems.
Diffstat (limited to 'sphinx/util/osutil.py')
-rw-r--r--sphinx/util/osutil.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py
index 9b5f58b7e..58ee31b75 100644
--- a/sphinx/util/osutil.py
+++ b/sphinx/util/osutil.py
@@ -194,3 +194,9 @@ def abspath(pathdir):
if isinstance(pathdir, bytes):
pathdir = pathdir.decode(fs_encoding)
return pathdir
+
+
+def getcwd():
+ if hasattr(os, 'getcwdu'):
+ return os.getcwdu()
+ return os.getcwd()