diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-27 05:42:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-27 05:42:56 +0400 |
commit | 7553440aa404743b537dd33e9feea9616e9abbfe (patch) | |
tree | f9430ed8a4aeeb521d08dd90040af0df487d6744 /release | |
parent | 40727d318dc36bab31298cf899fea67afd756d49 (diff) | |
parent | 8423b1b33a51ecc45480d664e4bba7e488eac704 (diff) |
svn merge ^/trunk/blender -r42172:42182
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/modules/addon_utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py index de662b47c4d..21f856a1396 100644 --- a/release/scripts/modules/addon_utils.py +++ b/release/scripts/modules/addon_utils.py @@ -235,7 +235,8 @@ def enable(module_name, default_set=True): # reload if the mtime changes mod = sys.modules.get(module_name) - if mod: + # chances of the file _not_ existing are low, but it could be removed + if mod and os.path.exists(mod.__file__): mod.__addon_enabled__ = False mtime_orig = getattr(mod, "__time__", 0) mtime_new = os.path.getmtime(mod.__file__) @@ -252,6 +253,7 @@ def enable(module_name, default_set=True): # Split registering up into 3 steps so we can undo # if it fails par way through. + # 1) try import try: mod = __import__(module_name) |