diff options
author | mathieui <mathieui@mathieui.net> | 2015-02-12 12:18:32 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2015-02-12 12:18:32 +0100 |
commit | 44f02fb3ab286e80d7f82031f751b3650cb94f8b (patch) | |
tree | 71a6600513a95e78317882ca547adb554da0406d | |
parent | f6b3a0c6cffa5ebf10d20c20b5cadd575c91fe81 (diff) | |
download | slixmpp-44f02fb3ab286e80d7f82031f751b3650cb94f8b.tar.gz slixmpp-44f02fb3ab286e80d7f82031f751b3650cb94f8b.tar.bz2 slixmpp-44f02fb3ab286e80d7f82031f751b3650cb94f8b.tar.xz slixmpp-44f02fb3ab286e80d7f82031f751b3650cb94f8b.zip |
Do the plugins post_init() upload loading
(the top_level boolean used to load them at this point wasn’t ever set
to true)
-rw-r--r-- | slixmpp/plugins/base.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/slixmpp/plugins/base.py b/slixmpp/plugins/base.py index 06be3789..0fe083bc 100644 --- a/slixmpp/plugins/base.py +++ b/slixmpp/plugins/base.py @@ -142,7 +142,6 @@ class PluginManager(object): :param dict config: Optional settings dictionary for configuring plugin behaviour. """ - top_level = False if enabled is None: enabled = set() @@ -166,14 +165,14 @@ class PluginManager(object): self.enable(dep, enabled=enabled) plugin._init() - if top_level: - for name in enabled: - if hasattr(self.plugins[name], 'old_style'): - # Older style plugins require post_init() - # to run just before stream processing begins, - # so we don't call it here. - pass - self.plugins[name].post_init() + for name in enabled: + if hasattr(self._plugins[name], 'old_style'): + # Older style plugins require post_init() + # to run just before stream processing begins, + # so we don't call it here. + pass + else: + self._plugins[name].post_init() def enable_all(self, names=None, config=None): """Enable all registered plugins. |