aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2021-04-29 22:56:28 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-04-29 22:56:28 +0000
commitac8bd87643e1e8bad6c4a24de1bbca5a831978e4 (patch)
treead5b023f997dbcc3d6111e4c9e73ce2216d12eba
parent6dcab493834b3d33a4e44e7bdf92e999a947d64b (diff)
parentbb6e08292705f60548340ed9f189931c47190f3e (diff)
downloadbuild-oreo-mr1-cts-dev.tar.gz
Merge "Fix bug: include all dirs not just the last one." into oreo-mr1-cts-devoreo-mr1-cts-dev
-rwxr-xr-xtools/generate-notice-files.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/generate-notice-files.py b/tools/generate-notice-files.py
index 2c319abb6b..2fe0d476a0 100755
--- a/tools/generate-notice-files.py
+++ b/tools/generate-notice-files.py
@@ -231,8 +231,8 @@ def main(argv):
input_dirs = [os.path.normpath(source_dir) for source_dir in args.source_dir]
# Find all the notice files and md5 them
+ files_with_same_hash = defaultdict(list)
for input_dir in input_dirs:
- files_with_same_hash = defaultdict(list)
for root, dir, files in os.walk(input_dir):
for file in files:
matched = True
@@ -252,10 +252,9 @@ def main(argv):
file_md5sum = md5sum(filename)
files_with_same_hash[file_md5sum].append(filename)
- filesets = [sorted(files_with_same_hash[md5]) for md5 in sorted(files_with_same_hash.keys())]
-
print "Combining NOTICE files into text"
+ filesets = [sorted(files_with_same_hash[md5]) for md5 in sorted(files_with_same_hash.keys())]
combine_notice_files_text(filesets, input_dirs, txt_output_file, file_title)
if html_output_file is not None: