summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/partition.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-02-15 14:58:22 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-04 23:18:17 +0000
commitd8cf70bf0f7320487b7f72b953ef929f6a1ba11e (patch)
treeeb65c112fb14414b531e31f60c6fed64a35de73a /scripts/lib/wic/partition.py
parent27e172c3b63d002ef4376b29d0cb5e461ced3e58 (diff)
downloadpoky-d8cf70bf0f7320487b7f72b953ef929f6a1ba11e.tar.gz
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>
Diffstat (limited to 'scripts/lib/wic/partition.py')
-rw-r--r--scripts/lib/wic/partition.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index d3cd5931f7..1f384be450 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -170,14 +170,11 @@ class Partition():
170 splitted = self.sourceparams.split(',') 170 splitted = self.sourceparams.split(',')
171 srcparams_dict = dict(par.split('=') for par in splitted if par) 171 srcparams_dict = dict(par.split('=') for par in splitted if par)
172 172
173 partition_methods = { 173 partition_methods = ["do_configure_partition", "do_stage_partition",
174 "do_stage_partition": None, 174 "do_prepare_partition"]
175 "do_prepare_partition": None, 175
176 "do_configure_partition": None 176 methods = PluginMgr.get_plugin_methods('source', self.source,
177 } 177 partition_methods)
178
179 methods = PluginMgr.get_source_plugin_methods(self.source,
180 partition_methods)
181 methods["do_configure_partition"](self, srcparams_dict, creator, 178 methods["do_configure_partition"](self, srcparams_dict, creator,
182 cr_workdir, oe_builddir, bootimg_dir, 179 cr_workdir, oe_builddir, bootimg_dir,
183 kernel_dir, native_sysroot) 180 kernel_dir, native_sysroot)