Fix merge_libs.py to correctly use the IGNORE_PATTERNS list.

The current version accidentally confused two different uses of "in"; it
replaced "substring in string" logic with "item in list" logic, which
won't work for substring matches.

BUG=
R=kjellander@webrtc.org, pthatcher@webrtc.org, tkchin@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/47889004

Cr-Commit-Position: refs/heads/master@{#8942}
This commit is contained in:
Noah Richards 2015-04-07 11:41:32 -07:00
parent 9e420afefc
commit fbe5b316bf

View File

@ -36,7 +36,7 @@ def FindFiles(path, pattern):
files = []
for root, _, filenames in os.walk(path):
for filename in fnmatch.filter(filenames, pattern):
if filename not in IGNORE_PATTERNS:
if all(pattern not in filename for pattern in IGNORE_PATTERNS):
# We use the relative path here to avoid "argument list too
# long" errors on Linux. Note: This doesn't always work, so
# we use the find command on Linux.