[cleanup] Misc

Closes #5576, closes #5887
This commit is contained in:
pukkandan
2023-01-02 19:39:03 +05:30
parent 8e174ba7de
commit 08e29b9f1f
15 changed files with 29 additions and 25 deletions

View File

@@ -3368,7 +3368,7 @@ def js_to_json(code, vars={}, *, strict=False):
try:
if not strict:
json.loads(vars[v])
except json.decoder.JSONDecodeError:
except json.JSONDecodeError:
return json.dumps(vars[v])
else:
return vars[v]