Only read required keys in settings file
This commit is contained in:
parent
fb47c15d6b
commit
ac8c7a0a4c
|
@ -73,7 +73,8 @@ class Settings:
|
|||
"""
|
||||
d = json.loads(json_str)
|
||||
for key in d:
|
||||
setattr(self, key, d[key])
|
||||
if hasattr(self, key):
|
||||
setattr(self, key, d[key])
|
||||
|
||||
def dumps_to_string(self) -> str:
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue