tern-tools / tern

Tern is a software composition analysis tool and Python library that generates a Software Bill of Materials for container images and Dockerfiles. The SBOM that Tern generates will give you a layer-by-layer view of what's inside your container in a variety of formats including human-readable, JSON, HTML, SPDX and more.
BSD 2-Clause "Simplified" License
967 stars 188 forks source link

Catch all invalid license key characters #1208

Closed rnjudge closed 1 year ago

rnjudge commented 1 year ago

A fix was previously made to catch a few specific invalid license characters (48e22cf). Because there can be a high number of invalid license characters, instead of trying to replace them all, this commit adds a try/catch statement to catch the AttributeError exception that gets thrown by license_expression when there is an invalid license character.

Resolves #1203

Signed-off-by: Rose Judge rjudge@vmware.com