summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mateusz Zięba <mateuszz@google.com> 2021-04-13 12:33:42 -0700
committer Bob Badour <bbadour@google.com> 2021-04-13 13:14:13 -0700
commit5371607b50ea4072e56beaa306ec40cf3daaf34a (patch)
treee094ea901196edec25f33cd09ace97ad4f8c4310
parent71c70485933b0680b1a95cba055ebbea5c8167dc (diff)
Fix bug: include all dirs not just the last one.
Test: m all Change-Id: I5724f792ee36c2f66786761e5d55b4f6c456753c
-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 18f2166fbd..bf958fbae4 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
@@ -254,8 +254,7 @@ 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())]
-
+ 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: