Skip to content

Commit fdfbb6f

Browse files
committed
handles case where there is no "state" returned by get_model_run_status
1 parent 89dabb5 commit fdfbb6f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/nhp/aci/__main__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ def _status_single_model_run(dataset: str, model_run_id: str) -> None:
9797
print(f"Unknown model run id: {model_run_id}")
9898
return
9999

100+
if "status" in status and status["status"] == "complete":
101+
print(f"{model_run_id}: complete")
102+
return
103+
104+
if "state" not in status:
105+
print(f"Model run {model_run_id} has no state information available")
106+
return
107+
100108
state = status["state"]
101109

102110
complete = status["complete"]

0 commit comments

Comments
 (0)