PyAPI: don't adjust prefs when an fails to load

Recent addons commit meant that addons would be enabled even if they weren't found.
This would give an error (which is fine), but also remove from preferences.
This commit is contained in:
Campbell Barton
2015-01-23 21:09:31 +11:00
parent 2dfe5e30ac
commit 3ff3f563e5
4 changed files with 9 additions and 7 deletions

View File

@@ -63,7 +63,7 @@ def test_load_addons():
for mod in modules:
mod_name = mod.__name__
print("\tenabling:", mod_name)
addon_utils.enable(mod_name)
addon_utils.enable(mod_name, default_set=True)
if mod_name not in addons:
addons_fail.append(mod_name)
@@ -87,7 +87,7 @@ def reload_addons(do_reload=True, do_reverse=True):
for mod in modules:
mod_name = mod.__name__
print("\tenabling:", mod_name)
addon_utils.enable(mod_name)
addon_utils.enable(mod_name, default_set=True)
assert(mod_name in addons)
for mod in modules: