1
0
Fork 0
mirror of synced 2024-11-22 08:15: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,7 +18,10 @@ class Dispatcher(object):
):
self._log = Messenger()
self._setup_context(base_directory, options)
plugins = plugins or []
if plugins == None:
plugins = Plugin.__subclasses__()
else:
plugins = plugins or []
self._plugins = [plugin(self._context) for plugin in plugins]
self._only = only
self._skip = skip