summaryrefslogtreecommitdiff
path: root/sphinx/util/osutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/osutil.py')
-rw-r--r--sphinx/util/osutil.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py
index 34b609b21..50cf8ee5c 100644
--- a/sphinx/util/osutil.py
+++ b/sphinx/util/osutil.py
@@ -20,8 +20,7 @@ import shutil
import gettext
from os import path
-import six
-from six import text_type
+from six import PY2, text_type
# Errnos that we need.
EEXIST = getattr(errno, 'EEXIST', 0)
@@ -150,7 +149,7 @@ no_fn_re = re.compile(r'[^a-zA-Z0-9_-]')
def make_filename(string):
return no_fn_re.sub('', string) or 'sphinx'
-if six.PY2:
+if PY2:
# strftime for unicode strings
def ustrftime(format, *args):
# if a locale is set, the time strings are encoded in the encoding
@@ -190,7 +189,7 @@ def find_catalog_files(docname, srcdir, locale_dirs, lang, compaction):
fs_encoding = sys.getfilesystemencoding() or sys.getdefaultencoding()
-if six.PY2:
+if PY2:
bytes = str
else:
bytes = bytes