Skip to content

Commit

Permalink
Fix optional data from deps.dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sethmlarson committed Oct 31, 2023
1 parent b5c8960 commit 275ef06
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,8 @@ def fetch_checks_for_package(package_name):
checks = {}
try:
for project in data["version"]["projects"]:
if "scorecardV2" in project:
scorecard = project["scorecardV2"]
for check in scorecard["check"]:
if scorecard := project.get("scorecardV2"):
for check in scorecard.get("check", None) or ():
check_name = check["name"]
check_score = check["score"]

Expand Down

0 comments on commit 275ef06

Please sign in to comment.