Skip __pycache__ in maintainers check

When tox runs, tools/check_maintainers.py fails with an error
``Directory __pycache__ not found in MAINTAINERS``

This happens, because unittest on py33 was merged to master, and
python 3 stores bytecode in the __pycache__ folder. So we should
not check an entry for this folder in MAINTAINERS file.

Change-Id: I3f311f37262739e50a59164e204d8ff806f5f408
This commit is contained in:
Viktors 2014-02-18 05:50:47 +02:00
parent 9a7f2f8543
commit 62333749b2
1 changed files with 2 additions and 1 deletions

View File

@ -62,8 +62,9 @@ def find_file(filename):
def check_directory(path):
skipped_entries = ['__init__.py', 'deprecated', '__pycache__']
for i in os.listdir(path):
if i.endswith('.pyc') or i in ['__init__.py', 'deprecated']:
if i.endswith('.pyc') or i in skipped_entries:
continue
if os.path.isdir(os.path.join(path, i)):
find_directory(i)