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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Utility for checking and processing licensing information in third_party 6 """Utility for checking and processing licensing information in third_party
7 directories. 7 directories.
8 8
9 Usage: licenses.py <command> 9 Usage: licenses.py <command>
10 10
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 # Don't recurse into any subdirs from here. 359 # Don't recurse into any subdirs from here.
360 dirs[:] = [] 360 dirs[:] = []
361 continue 361 continue
362 362
363 # Don't recurse into paths in ADDITIONAL_PATHS, like we do with regular 363 # Don't recurse into paths in ADDITIONAL_PATHS, like we do with regular
364 # third_party/foo paths. 364 # third_party/foo paths.
365 if path in ADDITIONAL_PATHS: 365 if path in ADDITIONAL_PATHS:
366 dirs[:] = [] 366 dirs[:] = []
367 367
368 for dir in ADDITIONAL_PATHS: 368 for dir in ADDITIONAL_PATHS:
369 if dir not in prune_paths: 369 if dir not in prune_paths and dir not in third_party_dirs:
Paweł Hajdan Jr. 2013/12/18 08:48:12 nit: Could you make third_party_dirs a set instead
370 third_party_dirs.append(dir) 370 third_party_dirs.append(dir)
371 371
372 return third_party_dirs 372 return third_party_dirs
373 373
374 374
375 def ScanThirdPartyDirs(root=None): 375 def ScanThirdPartyDirs(root=None):
376 """Scan a list of directories and report on any problems we find.""" 376 """Scan a list of directories and report on any problems we find."""
377 if root is None: 377 if root is None:
378 root = os.getcwd() 378 root = os.getcwd()
379 third_party_dirs = FindThirdPartyDirs(PRUNE_PATHS, root) 379 third_party_dirs = FindThirdPartyDirs(PRUNE_PATHS, root)
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 elif command == 'credits': 461 elif command == 'credits':
462 if not GenerateCredits(): 462 if not GenerateCredits():
463 return 1 463 return 1
464 else: 464 else:
465 print __doc__ 465 print __doc__
466 return 1 466 return 1
467 467
468 468
469 if __name__ == '__main__': 469 if __name__ == '__main__':
470 sys.exit(main()) 470 sys.exit(main())
OLDNEW
« 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