Skip to content

Commit eba3d28

Browse files
committed
add debug statements for missing cpe trees
1 parent 7ca3061 commit eba3d28

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/trustshell/products.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,15 @@ def _trees_with_cpes(ancestor_data: dict[str, Any]) -> list[Node]:
280280
_remove_duplicate_branches(base_node)
281281
_remove_duplicate_parent_nodes(base_node)
282282
first_children = _remove_root_return_children(base_node)
283-
trees_with_cpes = [tree for tree in first_children if _has_cpe_node(tree)]
283+
trees_with_cpes: list[Node] = []
284+
for tree in first_children:
285+
if not _has_cpe_node(tree):
286+
for leaf in tree.leaves:
287+
logger.debug(
288+
f"Found result {tree.name} with ancestor: {leaf.name} but no CPE parent"
289+
)
290+
else:
291+
trees_with_cpes.append(tree)
284292
return [_remove_non_cpe_branches(tree) for tree in trees_with_cpes]
285293

286294

0 commit comments

Comments
 (0)