From 85966f42dcf8fa52dc9bfee5a7bc720fb4aa153b Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Wed, 4 Mar 2020 15:29:48 +0100 Subject: [PATCH] print json decode error message The main point is to allow add-on dev' to debug their own json --- qt/aqt/addons.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt/aqt/addons.py b/qt/aqt/addons.py index 826fe4b0c..1944d7fc6 100644 --- a/qt/aqt/addons.py +++ b/qt/aqt/addons.py @@ -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