1
0
Fork 0
mirror of synced 2024-11-22 16:25:34 -05:00

Fix dispatcher when no plugins are given

When any plugin is using the dispatcher for nested actions it should
pass all plugins again to avoid that any plugin as subtask would be
handled.
Currently this means a lot of plugins are broken because they don't pass
plugins to the dispatcher.

To fix this, take all Plugin subclasses when no plugin is given (we
should at least have the default plugins).
This commit is contained in:
Wouter Franken 2023-02-19 13:08:41 +01:00
parent da928a4c6b
commit 8bd46a6549

View file

@ -18,6 +18,9 @@ class Dispatcher(object):
): ):
self._log = Messenger() self._log = Messenger()
self._setup_context(base_directory, options) self._setup_context(base_directory, options)
if plugins == None:
plugins = Plugin.__subclasses__()
else:
plugins = plugins or [] plugins = plugins or []
self._plugins = [plugin(self._context) for plugin in plugins] self._plugins = [plugin(self._context) for plugin in plugins]
self._only = only self._only = only