Skip to content

Commit 23fb8f5

Browse files
committed
Handle package not found in datasource
Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>
1 parent 7778009 commit 23fb8f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vulntotal/datasources/safetydb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def parse_advisory(response, purl: PackageURL) -> Iterable[VendorData]:
7575
VendorData instance containing the advisory information for the package.
7676
"""
7777

78-
for advisory in response.get(purl.name):
78+
for advisory in response.get(purl.name, []):
7979
yield VendorData(
8080
purl=PackageURL(purl.type, purl.namespace, purl.name),
8181
aliases=[advisory.get("cve"), advisory.get("id")],

0 commit comments

Comments
 (0)