Try to reload first; if fails, then not in path (addon), and try new import

svn: r15403
This commit is contained in:
Doug Blank 2010-05-13 13:02:52 +00:00
parent d134be8d2e
commit d2d983f10a

View File

@ -256,11 +256,11 @@ class BasePluginManager(object):
"""
Reloads modules that might not be in the path.
"""
if pdata.mod_name in sys.modules:
del sys.modules[pdata.mod_name]
try:
reload(module)
except:
if pdata.mod_name in sys.modules:
del sys.modules[pdata.mod_name]
module = self.import_plugin(pdata)
return module