summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2016-04-30 12:40:59 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-06 10:20:03 +0100
commit94655584cba7543781a8d45fdacbb6027a38b07c (patch)
tree5652c2d63efe661f44177fafc2e42e8d0885ef29
parent19e6fd5b7b53f75752dc82d0df0f5e65d10954ac (diff)
downloadpoky-94655584cba7543781a8d45fdacbb6027a38b07c.tar.gz
bitbake: bb.utils: let loaded plugins provide a plugin object
This lets us avoid treating the module like an object, so no globals are needed, if one chooses to do so. (Bitbake rev: 71bfd5beb0d0ed88c7c14bbfd5ca1a1b56122bc1) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index c54ff5b92b..5e735d3fa7 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -1477,5 +1477,7 @@ def load_plugins(logger, plugins, pluginpath):
1477 if name != '__init__': 1477 if name != '__init__':
1478 plugin = load_plugin(name) 1478 plugin = load_plugin(name)
1479 if hasattr(plugin, 'plugin_init'): 1479 if hasattr(plugin, 'plugin_init'):
1480 plugin.plugin_init(plugins) 1480 obj = plugin.plugin_init(plugins)
1481 plugins.append(plugin) 1481 plugins.append(obj or plugin)
1482 else:
1483 plugins.append(plugin)