mirror of
https://github.com/RGBCube/JsonWrapper
synced 2025-07-27 11:47:45 +00:00
fix
This commit is contained in:
parent
89a7e62bd0
commit
ca019736eb
1 changed files with 2 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue