[Bf-blender-cvs] [2851602052c] master: Add a reason for why an Addon can not be loaded. This change gives a more detailed explanation of the issue and may help the Addon Developer to identify what exactly needs to be changed.
Gaia Clary
noreply at git.blender.org
Mon Jun 21 12:52:15 CEST 2021
Commit: 2851602052ccd03034bb0f16f71a07f2471da5ec
Author: Gaia Clary
Date: Sun Jun 20 22:57:58 2021 +0200
Branches: master
https://developer.blender.org/rB2851602052ccd03034bb0f16f71a07f2471da5ec
Add a reason for why an Addon can not be loaded. This change gives a more detailed explanation of the issue and may help the Addon Developer to identify what exactly needs to be changed.
The current message 'addon not loaded' is a bit too sparse.
Differential Revision: https://developer.blender.org/D11655
===================================================================
M release/scripts/modules/addon_utils.py
===================================================================
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py
index 239dd1cf79b..73b978d7d2d 100644
--- a/release/scripts/modules/addon_utils.py
+++ b/release/scripts/modules/addon_utils.py
@@ -358,7 +358,8 @@ def enable(module_name, *, default_set=False, persistent=False, handle_error=Non
except Exception as ex:
# if the addon doesn't exist, don't print full traceback
if type(ex) is ImportError and ex.name == module_name:
- print("addon not found:", repr(module_name))
+ print("addon not loaded:", repr(module_name))
+ print("cause:", str(ex))
else:
handle_error(ex)
More information about the Bf-blender-cvs
mailing list