Merge "Don't descent into target dirs"

This commit is contained in:
Jenkins 2013-08-29 18:56:44 +00:00 committed by Gerrit Code Review
commit 9d55b0ebe1
1 changed files with 7 additions and 0 deletions

View File

@ -228,6 +228,13 @@ def build_affected_books(rootdir, book_exceptions, file_exceptions, force):
books = []
book_root = rootdir
for root, dirs, files in os.walk(rootdir):
# Don't descend into 'target' subdirectories
try:
ind = dirs.index('target')
del dirs[ind]
except ValueError:
pass
if os.path.basename(root) in book_exceptions:
break
elif "pom.xml" in files: