1
0

config: reject non-json-serialisable writes

see #4788
This commit is contained in:
SomberNight
2018-10-21 14:58:55 +02:00
parent ef2a6359e4
commit 6958c0ccc3
2 changed files with 7 additions and 1 deletions

View File

@@ -90,7 +90,7 @@ class JsonDB(PrintError):
json.dumps(key, cls=util.MyEncoder)
json.dumps(value, cls=util.MyEncoder)
except:
self.print_error("json error: cannot save", key)
self.print_error(f"json error: cannot save {repr(key)} ({repr(value)})")
return
with self.db_lock:
if value is not None: