1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Ensure we ignore __pycache__ PEP 3174 dirs in a few more places.

This commit is contained in:
Ramiro Morales
2012-10-06 18:40:58 -03:00
parent 69035b0b1c
commit 2100da9dcd
5 changed files with 8 additions and 5 deletions

View File

@@ -67,9 +67,10 @@ if root_dir != '':
django_dir = 'django'
for dirpath, dirnames, filenames in os.walk(django_dir):
# Ignore dirnames that start with '.'
# Ignore PEP 3147 cache dirs and those whose names start with '.'
for i, dirname in enumerate(dirnames):
if dirname.startswith('.'): del dirnames[i]
if dirname.startswith('.') or dirname == '__pycache__':
del dirnames[i]
if '__init__.py' in filenames:
packages.append('.'.join(fullsplit(dirpath)))
elif filenames: