summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-01-06 14:17:36 (GMT)
committerGeorg Brandl <georg@python.org>2008-01-06 14:17:36 (GMT)
commite2a902c66900d313704da1a0860c0c6e11fbab8a (patch)
tree639cf3ed7510289516413425626ab4c3f1062eca
parent94da1d6a21ad2205e70186c1ce0b46849305f755 (diff)
downloadcpython-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.
-rw-r--r--Lib/ntpath.py8
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'.