Skip to content

Commit b84c21a

Browse files
authored
Ignore engagement if state information is not found (for some reason) (#25)
1 parent 9c31ddb commit b84c21a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

generate-status/write_status.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
with open(f"../../{subject['directory']}/engagement.json", "r") as read_file:
2222
engagement = json.load(read_file)
2323

24+
if "current_state" not in subject["anarchy_subject"]["spec"]["vars"] or "desired_state" not in subject["anarchy_subject"]["spec"]["vars"]:
25+
print(f"Skipping {subject['directory']} - state information not found in the Anarchy subject")
26+
return
27+
2428
current_state = subject["anarchy_subject"]["spec"]["vars"]["current_state"]
2529
desired_state = subject["anarchy_subject"]["spec"]["vars"]["desired_state"]
2630

0 commit comments

Comments
 (0)