summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2019-08-27 12:11:40 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2019-08-27 12:11:40 +0000
commitf927d937a34319ebef55870238d89c7fd8a771bf (patch)
tree20827b5445cb8952cd0965d379e18f792f738a95
parentf701c9934a6da1df513a4a6b65fae70769531ae5 (diff)
downloaddocutils-f927d937a34319ebef55870238d89c7fd8a771bf.tar.gz
py3: Handle 'os.getcwdu' to 'os.getcwd' rename
We don't need to do the reverse since none of the callers seems to care. Based on patch by: Stephen Finucane <stephen@that.guru> git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8374 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
-rw-r--r--docutils/docutils/frontend.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/docutils/docutils/frontend.py b/docutils/docutils/frontend.py
index 4a38e19bb..037e23736 100644
--- a/docutils/docutils/frontend.py
+++ b/docutils/docutils/frontend.py
@@ -38,8 +38,10 @@ import optparse
from optparse import SUPPRESS_HELP
if sys.version_info >= (3, 0):
from configparser import RawConfigParser
+ from os import getcwd
else:
from ConfigParser import RawConfigParser
+ from os import getcwdu as getcwd
import docutils
import docutils.utils
@@ -256,7 +258,7 @@ def make_paths_absolute(pathdict, keys, base_path=None):
`OptionParser.relative_path_settings`.
"""
if base_path is None:
- base_path = os.getcwdu() # type(base_path) == unicode
+ base_path = os.getcwd() # type(base_path) == unicode
# to allow combining non-ASCII cwd with unicode values in `pathdict`
for key in keys:
if key in pathdict: