From: Georg Brandl Date: Sun, 6 Jan 2008 14:17:36 +0000 (+0000) Subject: #1696393: don't check for '.' and '..' in ntpath.walk since X-Git-Tag: v2.6a1~724 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2a902c66900d313704da1a0860c0c6e11fbab8a;p=thirdparty%2FPython%2Fcpython.git #1696393: don't check for '.' and '..' in ntpath.walk since they aren't returned from os.listdir anymore. Reported by Michael Haggerty. --- diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 06b2293293ee..fa2fc29970d9 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'.