From e2a902c66900d313704da1a0860c0c6e11fbab8a Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 6 Jan 2008 14:17:36 +0000 Subject: [PATCH] #1696393: don't check for '.' and '..' in ntpath.walk since they aren't returned from os.listdir anymore. Reported by Michael Haggerty. --- Lib/ntpath.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 06b2293293e..fa2fc29970d 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'.