Skip to content

Commit

Permalink
fix: license handling
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyharrison committed Aug 20, 2024
1 parent e5cd241 commit d8cfce9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib4sbom/cyclonedx/cyclonedx_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ def _cyclondex_component(self, d):
if "licenses" in d:
license_data = self.process_license(d["licenses"])
elif "evidence" in d:
license_data = self.process_license(d["evidence"])
if "licenses" in d["evidence"]:
license_data = self.process_license(d["evidence"]["licenses"])
if license_data is not None and len(license_data) > 0:
# Multiple ways of defining licenses
for license_info in license_data:
Expand Down

0 comments on commit d8cfce9

Please sign in to comment.