Parameterize the plugin calling, with run as the default.

This commit is contained in:
Mike Auty
2017-01-19 16:19:10 +00:00
parent 5d3ff13a6e
commit 49009ec458
+3 -2
View File
@@ -57,8 +57,9 @@ class PluginInterface(interfaces_configuration.ConfigurableInterface, validity.V
:rtype: interfaces.renderers.TreeGrid
"""
def __call__(self, **kwargs):
def __call__(self, method = 'run', **kwargs):
"""Method to make a plugin callable. It must still have been instantiated with a context and a config_path"""
for k, v in kwargs:
self.config[k] = v
return self.run()
method = getattr(self, method)
return method()