mirror of
Fork 0

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
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
1 changed files with 4 additions and 1 deletions

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__()
plugins = plugins or []
self._plugins = [plugin(self._context) for plugin in plugins]
self._only = only
self._skip = skip