don't recurse into directories that start with '.'

This commit is contained in:
Benjamin Peterson 2008-10-15 20:34:09 +00:00
parent c01e32118b
commit 501447d7c7
1 changed files with 2 additions and 1 deletions

View File

@ -99,7 +99,8 @@ def check(file):
for name in names:
fullname = os.path.join(file, name)
if ((recurse and os.path.isdir(fullname) and
not os.path.islink(fullname))
not os.path.islink(fullname) and
not os.path.split(fullname)[1].startswith("."))
or name.lower().endswith(".py")):
check(fullname)
return