mirror of
https://git.yoctoproject.org/poky
synced 2026-05-05 07:39:49 +02:00
wic: use PluginMgr directly
Instead of making a singleton object of PluginMgr class it's simpler to use PluginMgr class directly as any class is a singleton. (From OE-Core rev: cbe7dbd31f2292416d8e801e142679c69d9a44bc) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
f8a4bd9950
commit
ec7b604b1e
@@ -32,7 +32,7 @@ import logging
|
||||
import os
|
||||
|
||||
from wic import WicError
|
||||
from wic.plugin import pluginmgr
|
||||
from wic.plugin import PluginMgr
|
||||
from wic.utils.misc import get_bitbake_var
|
||||
|
||||
logger = logging.getLogger('wic')
|
||||
@@ -139,7 +139,7 @@ def list_source_plugins():
|
||||
"""
|
||||
List the available source plugins i.e. plugins available for --source.
|
||||
"""
|
||||
plugins = pluginmgr.get_source_plugins()
|
||||
plugins = PluginMgr.get_source_plugins()
|
||||
|
||||
for plugin in plugins:
|
||||
print(" %s" % plugin)
|
||||
@@ -185,7 +185,7 @@ def wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir,
|
||||
os.makedirs(options.outdir)
|
||||
|
||||
pname = 'direct'
|
||||
plugin_class = pluginmgr.get_plugins('imager').get(pname)
|
||||
plugin_class = PluginMgr.get_plugins('imager').get(pname)
|
||||
if not plugin_class:
|
||||
raise WicError('Unknown plugin: %s' % pname)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user