mirror of
https://github.com/RGBCube/JsonWrapper
synced 2025-07-27 11:47:45 +00:00
Update db.py
This commit is contained in:
parent
8b473742c7
commit
78b1a750a6
1 changed files with 2 additions and 1 deletions
3
db.py
3
db.py
|
@ -39,7 +39,8 @@ class ClutterDB:
|
||||||
with open(self.path_to_json, mode="r") as json_file:
|
with open(self.path_to_json, mode="r") as json_file:
|
||||||
json_data = json.load(json_file)
|
json_data = json.load(json_file)
|
||||||
with open(self.path_to_json, mode="w") as json_file:
|
with open(self.path_to_json, mode="w") as json_file:
|
||||||
json.dump(json_data.pop(key, None), json_file, indent=4)
|
json_data.pop(key, None)
|
||||||
|
json.dump(json_data, json_file, indent=4)
|
||||||
|
|
||||||
def nuke(self):
|
def nuke(self):
|
||||||
with open(self.path_to_json, mode="w") as json_file:
|
with open(self.path_to_json, mode="w") as json_file:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue