1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 12:29:55 +00:00

wic: reimplement PluginMgr.get_plugin_methods

Simplified the implementation of get_plugin_methods:
- get rid of looping over the dicrtionary, used access by key instead
- get rid of filling a dictionary that passed as a parameter

(From OE-Core rev: 875d4eede61b548d64f426c2ef077cc17e50cd45)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh
2017-02-15 14:58:22 +02:00
committed by Richard Purdie
parent 27e172c3b6
commit d8cf70bf0f
4 changed files with 19 additions and 26 deletions
+5 -5
View File
@@ -198,11 +198,11 @@ class DirectPlugin(ImagerPlugin):
disk_name = self.parts[0].disk
if source_plugin:
name = "do_install_disk"
methods = PluginMgr.get_source_plugin_methods(source_plugin,
{name: None})
methods["do_install_disk"](self._image, disk_name, self, self.workdir,
self.oe_builddir, self.bootimg_dir,
self.kernel_dir, self.native_sysroot)
method = PluginMgr.get_plugin_methods('source', source_plugin,
[name])[name]
method(self._image, disk_name, self, self.workdir,
self.oe_builddir, self.bootimg_dir,
self.kernel_dir, self.native_sysroot)
full_path = self._image.path
# Generate .bmap