summaryrefslogtreecommitdiff
path: root/Lib/ntpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r--Lib/ntpath.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index 06b2293293..fa2fc29970 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'.