Skip to content

Commit

Permalink
Cast plan height to int if available
Browse files Browse the repository at this point in the history
  • Loading branch information
pharr117 committed Sep 12, 2023
1 parent cf7fbb5 commit 2e90bc1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,15 @@ def fetch_data_for_network(network, network_type, repo_path):
print(f"Failed to parse binaries for network {network}. Non-fatal error, skipping...")
pass

plan_height = upgrade_plan.get("height", -1)
try:
plan_height = int(plan_height)
except ValueError:
plan_height = -1

# Include the expanded information in the output data
output_data["upgrade_plan"] = {
"height": upgrade_plan.get("height", None),
"height": plan_height,
"binaries": binaries,
"name": upgrade_plan.get("name", None),
"upgraded_client_state": upgrade_plan.get("upgraded_client_state", None),
Expand Down

0 comments on commit 2e90bc1

Please sign in to comment.