Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
ensure output set is unique
Browse files Browse the repository at this point in the history
  • Loading branch information
JimFuller-RedHat committed Jan 18, 2024
1 parent b5c93b8 commit b61ed8a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions griffon/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,18 @@ def generate_normalised_results(
):
normalised_results = list()
if "results" in output:
# ensure unique result set
seen = set()
results = []
for obj in output["results"]:
if "purl" in obj:
if obj["purl"] not in seen:
seen.add(obj["purl"])
results.append(obj)
else:
if obj["nvr"] not in seen:
seen.add(obj["nvr"])
results.append(obj)
for item in output["results"]:
for ps in item["product_streams"]:
# only include component from active product stream
Expand Down

0 comments on commit b61ed8a

Please sign in to comment.