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
78b1a750a6
commit
e8dc229458
1 changed files with 1 additions and 3 deletions
4
db.py
4
db.py
|
@ -26,10 +26,8 @@ class ClutterDB:
|
|||
json_data = json.load(json_file)
|
||||
if key in json_data:
|
||||
return json_data[key]
|
||||
elif "default" in kwargs:
|
||||
return kwargs["default"]
|
||||
else:
|
||||
return None
|
||||
return kwargs.get("default", None)
|
||||
|
||||
def all(self):
|
||||
with open(self.path_to_json, mode="r") as json_file:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue