]> granicus.if.org Git - python/commitdiff
Remove some redundant logic from walk() -- there's no need to check
authorGuido van Rossum <guido@python.org>
Tue, 29 Feb 2000 13:31:16 +0000 (13:31 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 29 Feb 2000 13:31:16 +0000 (13:31 +0000)
for "." and "..", since listdir() no longer returns those.

Lib/posixpath.py

index cc0e4cba1ff767b387bff1becb856fefc2c00221..a603e9ea99dc3ee8c59449249f5d7b2de98b9c7b 100644 (file)
@@ -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]):