Skip to content

Commit

Permalink
save list
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmonteiro committed Mar 19, 2024
1 parent 16c9185 commit 8e713a6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,14 @@ def run_with_params(params, mode="cli"):
with open('test_results.json', 'w', encoding='utf-8') as f:
json.dump({"Status":"Success"}, f, ensure_ascii=False, indent=4)
else:
with open('test_results.json', 'w', encoding='utf-8') as f:
json.dump(resultList, f, ensure_ascii=False, indent=4)
if isinstance(resultList, dict):
with open('test_results.json', 'w', encoding='utf-8') as f:
json.dump(resultList, f, ensure_ascii=False, indent=4)
else:
with open('test_results.json', "w") as f:
for line in resultList:
f.write(" ".join(line) + "\n")

raise Exception("At least one workflow comparison failed. Check the generated reported.")
except Exception as e:
util.msg("Workflow runner failed with error: ", True)
Expand Down

0 comments on commit 8e713a6

Please sign in to comment.