summaryrefslogtreecommitdiff
path: root/sphinx/util/osutil.py
diff options
context:
space:
mode:
authorTakayuki Shimizukawa <shimizukawa@gmail.com>2014-04-29 23:44:12 +0900
committerTakayuki Shimizukawa <shimizukawa@gmail.com>2014-04-29 23:44:12 +0900
commit00eff0b7f656b5212b6f4d2c567f6828ee81ee82 (patch)
treec2c9028bcde9a51b75743a7b00d298da59e86e03 /sphinx/util/osutil.py
parent91b9d75ac88afc349de4f8629b99c7fbcb3ff841 (diff)
downloadsphinx-git-00eff0b7f656b5212b6f4d2c567f6828ee81ee82.tar.gz
use six privided text_type() to replace with unicode() to support py2/py3 in one source. refs #1350.
Diffstat (limited to 'sphinx/util/osutil.py')
-rw-r--r--sphinx/util/osutil.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py
index 00cc1ae31..34b609b21 100644
--- a/sphinx/util/osutil.py
+++ b/sphinx/util/osutil.py
@@ -21,6 +21,7 @@ import gettext
from os import path
import six
+from six import text_type
# Errnos that we need.
EEXIST = getattr(errno, 'EEXIST', 0)
@@ -155,7 +156,7 @@ if six.PY2:
# if a locale is set, the time strings are encoded in the encoding
# given by LC_TIME; if that is available, use it
enc = locale.getlocale(locale.LC_TIME)[1] or 'utf-8'
- return time.strftime(unicode(format).encode(enc), *args).decode(enc)
+ return time.strftime(text_type(format).encode(enc), *args).decode(enc)
else:
ustrftime = time.strftime