Skip to content

Commit

Permalink
Try to get info and set binaries to empty array if not found
Browse files Browse the repository at this point in the history
  • Loading branch information
pharr117 committed Sep 11, 2023
1 parent e7de028 commit af52c82
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,13 @@ def fetch_data_for_network(network, network_type, repo_path):
source = "current_upgrade_plan"
rest_server_used = current_endpoint
# Extract the relevant information from the parsed JSON
info = json.loads(upgrade_plan.get("info", "{}"))
binaries = info.get("binaries", {})
info = {}
binaries = []
try:
info = json.loads(upgrade_plan.get("info", "{}"))
binaries = info.get("binaries", {})
except:
pass

# Include the expanded information in the output data
output_data["upgrade_plan"] = {
Expand Down

0 comments on commit af52c82

Please sign in to comment.