Commit 991fe852 authored by juga's avatar juga
Browse files

Catch json decode error when loading results

log the error, ingore the line and continue
parent e3355d1c
......@@ -44,7 +44,11 @@ def load_result_file(fname, success_only=False):
with open(fname, 'rt') as fd:
for line in fd:
num_total += 1
r = Result.from_dict(json.loads(line.strip()))
try:
r = Result.from_dict(json.loads(line.strip()))
except json.decoder.JSONDecodeError:
log.warning('Could not decode result %s', line.strip())
r = None
if r is None:
num_ignored += 1
continue
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment