Skip to content

Commit 2395d07

Browse files
authored
Merge pull request #213 from thaljef/master
Filter out inactive copyrights.
2 parents 392d57d + 8bf5050 commit 2395d07

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

examples/bd-upstream-copyrights/get_upstream_copyrights.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,14 @@ def main():
8484

8585
for component in bd.get_resource("components", project_version):
8686
try:
87-
copyrights = find_copyrights_in_bom_component_origins(component) \
87+
all_copyrights = find_copyrights_in_bom_component_origins(component) \
8888
or find_copyrights_in_github_origins(component) \
8989
or find_copyrights_in_previous_component_versions(component)
9090

91-
if copyrights:
92-
print_copyrights(component, copyrights)
91+
active_copyrights = [c for c in all_copyrights if c['active'] == True]
92+
93+
if active_copyrights:
94+
print_copyrights(component, active_copyrights)
9395
else:
9496
components_with_no_copyrights.append(component)
9597

0 commit comments

Comments
 (0)