"...git@developer.sourcefind.cn:OpenDAS/openpcdet.git" did not exist on "707a861a572dc465e2ff2bc1c84c75bec6bdb3db"
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")):
import json
if os.path.exists(output_file):
with open(output_file, "r") as f:
if f:
try:
timings = json.load(f)
except json.JSONDecodeError:
logger.info(f"Overwriting non-standard JSON in {output_file}.")
timings = {}
else:
timings = {}
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