diff options
author | shimizukawa <shimizukawa@gmail.com> | 2014-04-29 23:44:12 +0900 |
---|---|---|
committer | shimizukawa <shimizukawa@gmail.com> | 2014-04-29 23:44:12 +0900 |
commit | 16720b18c13a747e562c55842e7814d57376506e (patch) | |
tree | c2c9028bcde9a51b75743a7b00d298da59e86e03 /sphinx/util/osutil.py | |
parent | af372f6aceb77cf0586fdb786a674cdfd72c547d (diff) | |
download | sphinx-16720b18c13a747e562c55842e7814d57376506e.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.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py index 00cc1ae3..34b609b2 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 |