(cherry picked from commit 0d0bdbec62
)
This commit is contained in:
parent
5ea8fa4052
commit
3362ad16b1
1 changed files with 8 additions and 3 deletions
|
@ -347,9 +347,6 @@ class PluginLoader:
|
|||
|
||||
def _update_object(self, obj, name, path):
|
||||
|
||||
# load plugin config data
|
||||
self._load_config_defs(name, path)
|
||||
|
||||
# set extra info on the module, in case we want it later
|
||||
setattr(obj, '_original_path', path)
|
||||
setattr(obj, '_load_name', name)
|
||||
|
@ -393,6 +390,10 @@ class PluginLoader:
|
|||
return None
|
||||
raise
|
||||
|
||||
# load plugin config data
|
||||
if not found_in_cache:
|
||||
self._load_config_defs(name, path)
|
||||
|
||||
self._update_object(obj, name, path)
|
||||
return obj
|
||||
|
||||
|
@ -466,6 +467,10 @@ class PluginLoader:
|
|||
except TypeError as e:
|
||||
display.warning("Skipping plugin (%s) as it seems to be incomplete: %s" % (path, to_text(e)))
|
||||
|
||||
# load plugin config data
|
||||
if not found_in_cache:
|
||||
self._load_config_defs(name, path)
|
||||
|
||||
self._update_object(obj, name, path)
|
||||
yield obj
|
||||
|
||||
|
|
Loading…
Reference in a new issue