diff options
author | Georg Brandl <georg@python.org> | 2008-01-06 14:17:36 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-01-06 14:17:36 (GMT) |
commit | e2a902c66900d313704da1a0860c0c6e11fbab8a (patch) | |
tree | 639cf3ed7510289516413425626ab4c3f1062eca /Lib/ntpath.py | |
parent | 94da1d6a21ad2205e70186c1ce0b46849305f755 (diff) | |
download | cpython-e2a902c66900d313704da1a0860c0c6e11fbab8a.zip cpython-e2a902c66900d313704da1a0860c0c6e11fbab8a.tar.gz cpython-e2a902c66900d313704da1a0860c0c6e11fbab8a.tar.bz2 |
#1696393: don't check for '.' and '..' in ntpath.walk since
they aren't returned from os.listdir anymore.
Reported by Michael Haggerty.
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r-- | Lib/ntpath.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 06b2293..fa2fc29 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -254,12 +254,10 @@ def walk(top, func, arg): except os.error: return func(arg, top, names) - exceptions = ('.', '..') for name in names: - if name not in exceptions: - name = join(top, name) - if isdir(name): - walk(name, func, arg) + name = join(top, name) + if isdir(name): + walk(name, func, arg) # Expand paths beginning with '~' or '~user'. |