Commit 450f5236 authored by Brian Loyal's avatar Brian Loyal
Browse files

Added more error handling

parent 95c83ae1
...@@ -509,8 +509,11 @@ def update_timings(dict, output_file=os.path.join(os.getcwd(), "timings.json")): ...@@ -509,8 +509,11 @@ def update_timings(dict, output_file=os.path.join(os.getcwd(), "timings.json")):
import json import json
if os.path.exists(output_file): if os.path.exists(output_file):
with open(output_file, "r") as f: with open(output_file, "r") as f:
if f: try:
timings = json.load(f) timings = json.load(f)
except json.JSONDecodeError:
logger.info(f"Overwriting non-standard JSON in {output_file}.")
timings = {}
else: else:
timings = {} timings = {}
timings.update(dict) timings.update(dict)
......
Markdown is supported
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