From bf95d7dc1f894b97e08f1b82dd3bbc93b17dd512 Mon Sep 17 00:00:00 2001 From: Prabhu Subramanian Date: Fri, 15 Nov 2024 11:08:12 +0000 Subject: [PATCH] --bom search was not working Signed-off-by: Prabhu Subramanian --- pyproject.toml | 2 +- vdb/cli.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d78376e..86798a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "appthreat-vulnerability-db" -version = "6.2.0" +version = "6.2.1" description = "AppThreat's vulnerability database and package search library with a built-in sqlite based storage. OSV, CVE, GitHub, npm are the primary sources of vulnerabilities." authors = [ {name = "Team AppThreat", email = "cloud@appthreat.com"}, diff --git a/vdb/cli.py b/vdb/cli.py index d48ecea..0cbd351 100644 --- a/vdb/cli.py +++ b/vdb/cli.py @@ -199,7 +199,10 @@ def print_results(results): for result_gen in results: if isinstance(result_gen, dict): add_table_row(table, result_gen, added_row_keys) - if isinstance(result_gen, types.GeneratorType): + elif isinstance(result_gen, list): + for res in result_gen: + add_table_row(table, res, added_row_keys) + elif isinstance(result_gen, types.GeneratorType): for res in result_gen: add_table_row(table, res, added_row_keys) elif isinstance(results, list):