diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-03-20 05:23:09 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-03-20 05:23:09 (GMT) |
commit | c990f6454f2725c143f215d49de305ecb2a935e0 (patch) | |
tree | 46daae0bd01cacc40b7972925192c18c398acbfe /Lib/os.py | |
parent | c473d5ebabae4375f767ae1125e1b28809d45701 (diff) | |
download | cpython-c990f6454f2725c143f215d49de305ecb2a935e0.zip cpython-c990f6454f2725c143f215d49de305ecb2a935e0.tar.gz cpython-c990f6454f2725c143f215d49de305ecb2a935e0.tar.bz2 |
Try backing out 54407 to see if it corrects the problems on the Windows
buildbots. This rev was backported, so we will need to keep both branches
in sync, pending the outcome of the test after this checkin.
Diffstat (limited to 'Lib/os.py')
-rw-r--r-- | Lib/os.py | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -221,7 +221,7 @@ def renames(old, new): __all__.extend(["makedirs", "removedirs", "renames"]) -def walk(top, topdown=True, onerror=None, followlinks=False): +def walk(top, topdown=True, onerror=None): """Directory tree generator. For each directory in the directory tree rooted at top (including top @@ -257,10 +257,6 @@ def walk(top, topdown=True, onerror=None, followlinks=False): to abort the walk. Note that the filename is available as the filename attribute of the exception object. - By default, os.walk does not follow symbolic links to subdirectories on - systems that support them. In order to get this functionality, set the - optional argument 'followlinks' to true. - Caution: if you pass a relative pathname for top, don't change the current working directory between resumptions of walk. walk never changes the current directory, and assumes that the client doesn't @@ -304,8 +300,8 @@ def walk(top, topdown=True, onerror=None, followlinks=False): yield top, dirs, nondirs for name in dirs: path = join(top, name) - if followlinks or not islink(path): - for x in walk(path, topdown, onerror, followlinks): + if not islink(path): + for x in walk(path, topdown, onerror): yield x if not topdown: yield top, dirs, nondirs |