Index: tools/licenses.py |
diff --git a/tools/licenses.py b/tools/licenses.py |
index e87a54d1682565088f01b458b7d5f7d18eda111c..420ece43758ca54c166e87fe223d972583d242fe 100755 |
--- a/tools/licenses.py |
+++ b/tools/licenses.py |
@@ -334,7 +334,7 @@ def FilterDirsWithFiles(dirs_list, root): |
def FindThirdPartyDirs(prune_paths, root): |
"""Find all third_party directories underneath the source root.""" |
- third_party_dirs = [] |
+ third_party_dirs = set() |
for path, dirs, files in os.walk(root): |
path = path[len(root)+1:] # Pretty up the path. |
@@ -354,7 +354,7 @@ def FindThirdPartyDirs(prune_paths, root): |
for dir in dirs: |
dirpath = os.path.join(path, dir) |
if dirpath not in prune_paths: |
- third_party_dirs.append(dirpath) |
+ third_party_dirs.add(dirpath) |
# Don't recurse into any subdirs from here. |
dirs[:] = [] |
@@ -367,7 +367,7 @@ def FindThirdPartyDirs(prune_paths, root): |
for dir in ADDITIONAL_PATHS: |
if dir not in prune_paths: |
- third_party_dirs.append(dir) |
+ third_party_dirs.add(dir) |
return third_party_dirs |