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

Direct check for key in command['base'] dictionary #1056

Closed debbie-leung closed 3 years ago

debbie-leung commented 3 years ago

The get_base_listing function checks if a specific key exists in the command_lib['base'] dictionary. Rather than checking the return value of command_lib['base'].keys() we directly check the command_lib['base'] dictionary to improve performance.

Resolves: #1040

Signed-off-by: Debbie Leung dsl2162@columbia.edu