From 3d630f7f56a242faed24dc6d9def2c806a789ed2 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Wed, 17 Jan 2024 19:39:23 +0100 Subject: [PATCH] common.py: handle missing "runtime" job result field --- common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.py b/common.py index 467b216..016f699 100644 --- a/common.py +++ b/common.py @@ -23,7 +23,7 @@ def parse_job(job): result = {} result["status"] = job["result"]["status"] in { 0, "0", "pass" } result["worker"] = job["result"]["worker"] - result["runtime"] = float(job["result"]["runtime"]) + result["runtime"] = float(job["result"].get("runtime", 0)) result["output"] = job["result"]["output"] result["name"] = os.path.join( *job["result"]["body"]["command"].split()[1:]