diff --git a/json_wrapper.py b/json_wrapper.py index 9bf3eb6..8163312 100644 --- a/json_wrapper.py +++ b/json_wrapper.py @@ -33,9 +33,10 @@ class _JsonUtils: with open(self.json_path, mode="r") as json_file: data = json.load(json_file) - except ValueError: + except (FileNotFoundError, ValueError): with open(self.json_path, mode="w") as json_file: json.dump({}, json_file) + return if not isinstance(data, dict): print("test")