summaryrefslogtreecommitdiffstats
path: root/Lib/posixpath.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-02-29 13:31:16 (GMT)
committerGuido van Rossum <guido@python.org>2000-02-29 13:31:16 (GMT)
commita9b2b4be26df7c3da8a20d1a5f4d2b796e455b4b (patch)
tree327caac0dcc5b5b1ad229866cbf16ecb6820f562 /Lib/posixpath.py
parent1b6d21bb3e931cffd30cfa9897405d282d4545e8 (diff)
downloadcpython-a9b2b4be26df7c3da8a20d1a5f4d2b796e455b4b.zip
cpython-a9b2b4be26df7c3da8a20d1a5f4d2b796e455b4b.tar.gz
cpython-a9b2b4be26df7c3da8a20d1a5f4d2b796e455b4b.tar.bz2
Remove some redundant logic from walk() -- there's no need to check
for "." and "..", since listdir() no longer returns those.
Diffstat (limited to 'Lib/posixpath.py')
-rw-r--r--Lib/posixpath.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py
index cc0e4cb..a603e9e 100644
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -263,9 +263,7 @@ of all the files and subdirs in directory "d".
except os.error:
return
func(arg, top, names)
- exceptions = ('.', '..')
for name in names:
- if name not in exceptions:
name = join(top, name)
st = os.lstat(name)
if stat.S_ISDIR(st[stat.ST_MODE]):