mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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:
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user