diff --git a/software/firmware/file_utils.py b/software/firmware/file_utils.py index 576e72cda..ad8e642ca 100644 --- a/software/firmware/file_utils.py +++ b/software/firmware/file_utils.py @@ -1,3 +1,4 @@ +import errno import os import json @@ -36,7 +37,10 @@ def load_json_file(filename, mode="r") -> dict: print(f"Unable to parse JSON data from {filename}: {e}") return {} except OSError as e: - print(f"Unable to read JSON data from {filename}: {e}") + if e.errno == errno.ENOENT: + print(f"/{filename} does not exist. Using default settings") + else: + print(f"Unable to open {filename}: {e}") return {}