Only read required keys in settings file

This commit is contained in:
Yohann D'ANELLO 2021-01-08 11:07:38 +01:00
parent fb47c15d6b
commit ac8c7a0a4c
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -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:
"""