[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51254] trunk/blender/release/scripts/ modules/addon_utils.py: check addons are enabled before disabling them ( would cause python exceptions when removing a disabled addon).
Campbell Barton
ideasman42 at gmail.com
Wed Oct 10 13:37:38 CEST 2012
Revision: 51254
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51254
Author: campbellbarton
Date: 2012-10-10 11:37:38 +0000 (Wed, 10 Oct 2012)
Log Message:
-----------
check addons are enabled before disabling them (would cause python exceptions when removing a disabled addon).
Modified Paths:
--------------
trunk/blender/release/scripts/modules/addon_utils.py
Modified: trunk/blender/release/scripts/modules/addon_utils.py
===================================================================
--- trunk/blender/release/scripts/modules/addon_utils.py 2012-10-10 11:36:24 UTC (rev 51253)
+++ trunk/blender/release/scripts/modules/addon_utils.py 2012-10-10 11:37:38 UTC (rev 51254)
@@ -311,7 +311,7 @@
# possible this addon is from a previous session and didn't load a
# module this time. So even if the module is not found, still disable
# the addon in the user prefs.
- if mod:
+ if mod and getattr(mod, "__addon_enabled__", False) is not False:
mod.__addon_enabled__ = False
mod.__addon_persistent = False
More information about the Bf-blender-cvs
mailing list