Fix T67577: Add-on unregister can't access preferences on factory reset

This commit is contained in:
Campbell Barton
2020-06-03 14:34:18 +10:00
parent 2749e6a639
commit f0df4d6c35
2 changed files with 15 additions and 4 deletions

View File

@@ -170,10 +170,6 @@ def activate(template_id=None):
if template_id_prev:
_disable(template_id_prev)
# Disable all addons, afterwards caller must reset.
import addon_utils
addon_utils.disable_all()
# ignore_not_found so modules that don't contain scripts don't raise errors
_mod = _enable(template_id, ignore_not_found=True) if template_id else None