mirror of
https://github.com/RGBCube/JsonWrapper
synced 2025-07-27 11:47:45 +00:00
Update json_wrapper.py
This commit is contained in:
parent
ca019736eb
commit
9cee07f702
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ class _JsonUtils:
|
||||||
with open(self.json_path, mode="r") as json_file:
|
with open(self.json_path, mode="r") as json_file:
|
||||||
data = json.load(json_file)
|
data = json.load(json_file)
|
||||||
|
|
||||||
except (FileNotFoundError, ValueError):
|
except (FileNotFoundError, JSONDecodeError):
|
||||||
with open(self.json_path, mode="w") as json_file:
|
with open(self.json_path, mode="w") as json_file:
|
||||||
json.dump({}, json_file)
|
json.dump({}, json_file)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue