mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 08:22:24 -04:00
print json decode error message
The main point is to allow add-on dev' to debug their own json
This commit is contained in:
parent
f054fa14d6
commit
85966f42dc
1 changed files with 2 additions and 1 deletions
|
@ -251,7 +251,8 @@ class AddonManager:
|
||||||
try:
|
try:
|
||||||
with open(path, encoding="utf8") as f:
|
with open(path, encoding="utf8") as f:
|
||||||
return json.load(f)
|
return json.load(f)
|
||||||
except:
|
except json.JSONDecodeError as e:
|
||||||
|
print(f"json error in add-on {dir}:\n{e}")
|
||||||
return dict()
|
return dict()
|
||||||
|
|
||||||
# in new code, use write_addon_meta() instead
|
# in new code, use write_addon_meta() instead
|
||||||
|
|
Loading…
Reference in a new issue