Fix: The application now check extra Python versions (3.0, 3.1) to stop invoking. And fix a trivial comment.

This commit is contained in:
Takayuki Shimizukawa
2014-01-18 16:30:54 +09:00
parent cc7509966c
commit b6005b22ef
2 changed files with 5 additions and 5 deletions

View File

@@ -42,7 +42,8 @@ if '+' in __version__ or 'pre' in __version__:
def main(argv=sys.argv):
"""Sphinx build "main" command-line entry."""
if sys.version_info[:3] < (2, 6, 0):
if (sys.version_info[:3] < (2, 6, 0) or
(3, 0, 0) <= sys.version_info[:3] < (3, 2, 0)):
sys.stderr.write('Error: Sphinx requires at least Python 2.6 to run.\n')
return 1
try:

View File

@@ -69,10 +69,9 @@ def ensuredir(path):
raise
# TODO: This function can be removed because this function is same as os.walk
# of Python2.6, 2.7, 3.2, 3.3.
# HOWEVER, this function is customized to check UnicodeError that obstacle to
# replace the function with the os.walk.
# This function is same as os.walk of Python2.6, 2.7, 3.2, 3.3 except a
# customization that check UnicodeError.
# The customization obstacle to replace the function with the os.walk.
def walk(top, topdown=True, followlinks=False):
"""Backport of os.walk from 2.6, where the *followlinks* argument was
added.