print json decode error message

The main point is to allow add-on dev' to debug their own json
This commit is contained in:
Arthur Milchior 2020-03-04 15:29:48 +01:00
parent f054fa14d6
commit 85966f42dc

View file

@ -251,7 +251,8 @@ class AddonManager:
try:
with open(path, encoding="utf8") as f:
return json.load(f)
except:
except json.JSONDecodeError as e:
print(f"json error in add-on {dir}:\n{e}")
return dict()
# in new code, use write_addon_meta() instead