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
1 changed files with 2 additions and 1 deletions

View File

@ -73,6 +73,7 @@ class Settings:
"""
d = json.loads(json_str)
for key in d:
if hasattr(self, key):
setattr(self, key, d[key])
def dumps_to_string(self) -> str: