summaryrefslogtreecommitdiff
path: root/sphinx/apidoc.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-03-01 09:13:32 +0100
committerGeorg Brandl <georg@python.org>2014-03-01 09:13:32 +0100
commite736be637aefdd1d2a6eca2061ef002b4675f477 (patch)
treed4287fadf21cd2d5bbee9b6790fe63a9f26c2118 /sphinx/apidoc.py
parent048b7d77d3c7192f0ab2768ca536f5d495ebc58b (diff)
downloadsphinx-git-e736be637aefdd1d2a6eca2061ef002b4675f477.tar.gz
Closes #1383: Fix Python 2.5 compatibility of sphinx-apidoc.
Diffstat (limited to 'sphinx/apidoc.py')
-rw-r--r--sphinx/apidoc.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py
index d60b3f2b7..6c423185c 100644
--- a/sphinx/apidoc.py
+++ b/sphinx/apidoc.py
@@ -19,6 +19,8 @@ import sys
import optparse
from os import path
+from sphinx.util.osutil import walk
+
# automodule options
if 'SPHINX_APIDOC_OPTIONS' in os.environ:
OPTIONS = os.environ['SPHINX_APIDOC_OPTIONS'].split(',')
@@ -183,7 +185,7 @@ def recurse_tree(rootpath, excludes, opts):
toplevels = []
followlinks = getattr(opts, 'followlinks', False)
includeprivate = getattr(opts, 'includeprivate', False)
- for root, subs, files in os.walk(rootpath, followlinks=followlinks):
+ for root, subs, files in walk(rootpath, followlinks=followlinks):
# document only Python module files (that aren't excluded)
py_files = sorted(f for f in files
if path.splitext(f)[1] in PY_SUFFIXES and