Do the plugins post_init() upload loading
(the top_level boolean used to load them at this point wasn’t ever set to true)
This commit is contained in:
parent
f6b3a0c6cf
commit
44f02fb3ab
@ -142,7 +142,6 @@ class PluginManager(object):
|
|||||||
:param dict config: Optional settings dictionary for
|
:param dict config: Optional settings dictionary for
|
||||||
configuring plugin behaviour.
|
configuring plugin behaviour.
|
||||||
"""
|
"""
|
||||||
top_level = False
|
|
||||||
if enabled is None:
|
if enabled is None:
|
||||||
enabled = set()
|
enabled = set()
|
||||||
|
|
||||||
@ -166,14 +165,14 @@ class PluginManager(object):
|
|||||||
self.enable(dep, enabled=enabled)
|
self.enable(dep, enabled=enabled)
|
||||||
plugin._init()
|
plugin._init()
|
||||||
|
|
||||||
if top_level:
|
for name in enabled:
|
||||||
for name in enabled:
|
if hasattr(self._plugins[name], 'old_style'):
|
||||||
if hasattr(self.plugins[name], 'old_style'):
|
# Older style plugins require post_init()
|
||||||
# Older style plugins require post_init()
|
# to run just before stream processing begins,
|
||||||
# to run just before stream processing begins,
|
# so we don't call it here.
|
||||||
# so we don't call it here.
|
pass
|
||||||
pass
|
else:
|
||||||
self.plugins[name].post_init()
|
self._plugins[name].post_init()
|
||||||
|
|
||||||
def enable_all(self, names=None, config=None):
|
def enable_all(self, names=None, config=None):
|
||||||
"""Enable all registered plugins.
|
"""Enable all registered plugins.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user