Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: tools/licenses.py

Issue 114723009: Fixes duplicate listing of third party libraries in credits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use a set to avoid duplicate paths. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698