Merge pull request #492 from Arthur-Milchior/print_json_decode_error

print json decode error message
This commit is contained in:
Damien Elmes 2020-03-05 07:26:17 +10:00 committed by GitHub
commit 78e9959e78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -252,7 +252,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