mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
wic: Code cleanup: bad-classmethod-argument
Fixed wrong name for the first argument in class methods. Pylint complains about the issue this way: Class method should have 'cls' as first argument (From OE-Core rev: cd7c72d6d5a5110173d0d3f60f2991b1dc30fc26) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
9286213688
commit
553f332265
|
@ -52,7 +52,7 @@ class SourcePlugin(_Plugin):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_install_disk(self, disk, disk_name, cr, workdir, oe_builddir,
|
def do_install_disk(cls, disk, disk_name, cr, workdir, oe_builddir,
|
||||||
bootimg_dir, kernel_dir, native_sysroot):
|
bootimg_dir, kernel_dir, native_sysroot):
|
||||||
"""
|
"""
|
||||||
Called after all partitions have been prepared and assembled into a
|
Called after all partitions have been prepared and assembled into a
|
||||||
|
@ -62,7 +62,7 @@ class SourcePlugin(_Plugin):
|
||||||
msger.debug("SourcePlugin: do_install_disk: disk: %s" % disk_name)
|
msger.debug("SourcePlugin: do_install_disk: disk: %s" % disk_name)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_stage_partition(self, part, source_params, cr, cr_workdir,
|
def do_stage_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir,
|
oe_builddir, bootimg_dir, kernel_dir,
|
||||||
native_sysroot):
|
native_sysroot):
|
||||||
"""
|
"""
|
||||||
|
@ -79,7 +79,7 @@ class SourcePlugin(_Plugin):
|
||||||
msger.debug("SourcePlugin: do_stage_partition: part: %s" % part)
|
msger.debug("SourcePlugin: do_stage_partition: part: %s" % part)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_configure_partition(self, part, source_params, cr, cr_workdir,
|
def do_configure_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir,
|
oe_builddir, bootimg_dir, kernel_dir,
|
||||||
native_sysroot):
|
native_sysroot):
|
||||||
"""
|
"""
|
||||||
|
@ -90,7 +90,7 @@ class SourcePlugin(_Plugin):
|
||||||
msger.debug("SourcePlugin: do_configure_partition: part: %s" % part)
|
msger.debug("SourcePlugin: do_configure_partition: part: %s" % part)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_prepare_partition(self, part, source_params, cr, cr_workdir,
|
def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir, rootfs_dir,
|
oe_builddir, bootimg_dir, kernel_dir, rootfs_dir,
|
||||||
native_sysroot):
|
native_sysroot):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -36,7 +36,7 @@ class DirectPlugin(ImagerPlugin):
|
||||||
name = 'direct'
|
name = 'direct'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __rootfs_dir_to_dict(self, rootfs_dirs):
|
def __rootfs_dir_to_dict(cls, rootfs_dirs):
|
||||||
"""
|
"""
|
||||||
Gets a string that contain 'connection=dir' splitted by
|
Gets a string that contain 'connection=dir' splitted by
|
||||||
space and return a dict
|
space and return a dict
|
||||||
|
@ -49,7 +49,7 @@ class DirectPlugin(ImagerPlugin):
|
||||||
return krootfs_dir
|
return krootfs_dir
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_create(self, subcmd, opts, *args):
|
def do_create(cls, subcmd, opts, *args):
|
||||||
"""
|
"""
|
||||||
Create direct image, called from creator as 'direct' cmd
|
Create direct image, called from creator as 'direct' cmd
|
||||||
"""
|
"""
|
||||||
|
@ -67,7 +67,7 @@ class DirectPlugin(ImagerPlugin):
|
||||||
image_output_dir = args[5]
|
image_output_dir = args[5]
|
||||||
oe_builddir = args[6]
|
oe_builddir = args[6]
|
||||||
|
|
||||||
krootfs_dir = self.__rootfs_dir_to_dict(rootfs_dir)
|
krootfs_dir = cls.__rootfs_dir_to_dict(rootfs_dir)
|
||||||
|
|
||||||
configmgr._ksconf = ksconf
|
configmgr._ksconf = ksconf
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ class BootimgEFIPlugin(SourcePlugin):
|
||||||
name = 'bootimg-efi'
|
name = 'bootimg-efi'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_configure_grubefi(self, hdddir, cr, cr_workdir):
|
def do_configure_grubefi(cls, hdddir, cr, cr_workdir):
|
||||||
"""
|
"""
|
||||||
Create loader-specific (grub-efi) config
|
Create loader-specific (grub-efi) config
|
||||||
"""
|
"""
|
||||||
|
@ -71,7 +71,7 @@ class BootimgEFIPlugin(SourcePlugin):
|
||||||
cfg.close()
|
cfg.close()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_configure_gummiboot(self, hdddir, cr, cr_workdir):
|
def do_configure_gummiboot(cls, hdddir, cr, cr_workdir):
|
||||||
"""
|
"""
|
||||||
Create loader-specific (gummiboot) config
|
Create loader-specific (gummiboot) config
|
||||||
"""
|
"""
|
||||||
|
@ -112,7 +112,7 @@ class BootimgEFIPlugin(SourcePlugin):
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_configure_partition(self, part, source_params, cr, cr_workdir,
|
def do_configure_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir,
|
oe_builddir, bootimg_dir, kernel_dir,
|
||||||
native_sysroot):
|
native_sysroot):
|
||||||
"""
|
"""
|
||||||
|
@ -127,9 +127,9 @@ class BootimgEFIPlugin(SourcePlugin):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if source_params['loader'] == 'grub-efi':
|
if source_params['loader'] == 'grub-efi':
|
||||||
self.do_configure_grubefi(hdddir, cr, cr_workdir)
|
cls.do_configure_grubefi(hdddir, cr, cr_workdir)
|
||||||
elif source_params['loader'] == 'gummiboot':
|
elif source_params['loader'] == 'gummiboot':
|
||||||
self.do_configure_gummiboot(hdddir, cr, cr_workdir)
|
cls.do_configure_gummiboot(hdddir, cr, cr_workdir)
|
||||||
else:
|
else:
|
||||||
msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader'])
|
msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader'])
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
@ -137,7 +137,7 @@ class BootimgEFIPlugin(SourcePlugin):
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_prepare_partition(self, part, source_params, cr, cr_workdir,
|
def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir,
|
oe_builddir, bootimg_dir, kernel_dir,
|
||||||
rootfs_dir, native_sysroot):
|
rootfs_dir, native_sysroot):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -35,7 +35,7 @@ class BootimgPartitionPlugin(SourcePlugin):
|
||||||
name = 'bootimg-partition'
|
name = 'bootimg-partition'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_install_disk(self, disk, disk_name, cr, workdir, oe_builddir,
|
def do_install_disk(cls, disk, disk_name, cr, workdir, oe_builddir,
|
||||||
bootimg_dir, kernel_dir, native_sysroot):
|
bootimg_dir, kernel_dir, native_sysroot):
|
||||||
"""
|
"""
|
||||||
Called after all partitions have been prepared and assembled into a
|
Called after all partitions have been prepared and assembled into a
|
||||||
|
@ -44,7 +44,7 @@ class BootimgPartitionPlugin(SourcePlugin):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_configure_partition(self, part, source_params, cr, cr_workdir,
|
def do_configure_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir,
|
oe_builddir, bootimg_dir, kernel_dir,
|
||||||
native_sysroot):
|
native_sysroot):
|
||||||
"""
|
"""
|
||||||
|
@ -55,7 +55,7 @@ class BootimgPartitionPlugin(SourcePlugin):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_prepare_partition(self, part, source_params, cr, cr_workdir,
|
def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir,
|
oe_builddir, bootimg_dir, kernel_dir,
|
||||||
rootfs_dir, native_sysroot):
|
rootfs_dir, native_sysroot):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -37,7 +37,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
|
||||||
name = 'bootimg-pcbios'
|
name = 'bootimg-pcbios'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_install_disk(self, disk, disk_name, cr, workdir, oe_builddir,
|
def do_install_disk(cls, disk, disk_name, cr, workdir, oe_builddir,
|
||||||
bootimg_dir, kernel_dir, native_sysroot):
|
bootimg_dir, kernel_dir, native_sysroot):
|
||||||
"""
|
"""
|
||||||
Called after all partitions have been prepared and assembled into a
|
Called after all partitions have been prepared and assembled into a
|
||||||
|
@ -64,7 +64,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
|
||||||
raise ImageError("Unable to set MBR to %s" % full_path)
|
raise ImageError("Unable to set MBR to %s" % full_path)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_configure_partition(self, part, source_params, cr, cr_workdir,
|
def do_configure_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir,
|
oe_builddir, bootimg_dir, kernel_dir,
|
||||||
native_sysroot):
|
native_sysroot):
|
||||||
"""
|
"""
|
||||||
|
@ -113,7 +113,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
|
||||||
cfg.close()
|
cfg.close()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_prepare_partition(self, part, source_params, cr, cr_workdir,
|
def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir,
|
oe_builddir, bootimg_dir, kernel_dir,
|
||||||
rootfs_dir, native_sysroot):
|
rootfs_dir, native_sysroot):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -25,7 +25,7 @@ class FSImagePlugin(SourcePlugin):
|
||||||
name = 'fsimage'
|
name = 'fsimage'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_install_disk(self, disk, disk_name, cr, workdir, oe_builddir,
|
def do_install_disk(cls, disk, disk_name, cr, workdir, oe_builddir,
|
||||||
bootimg_dir, kernel_dir, native_sysroot):
|
bootimg_dir, kernel_dir, native_sysroot):
|
||||||
"""
|
"""
|
||||||
Called after all partitions have been prepared and assembled into a
|
Called after all partitions have been prepared and assembled into a
|
||||||
|
@ -34,7 +34,7 @@ class FSImagePlugin(SourcePlugin):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_configure_partition(self, part, source_params, cr, cr_workdir,
|
def do_configure_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir,
|
oe_builddir, bootimg_dir, kernel_dir,
|
||||||
native_sysroot):
|
native_sysroot):
|
||||||
"""
|
"""
|
||||||
|
@ -44,7 +44,7 @@ class FSImagePlugin(SourcePlugin):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_prepare_partition(self, part, source_params, cr, cr_workdir,
|
def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir,
|
oe_builddir, bootimg_dir, kernel_dir,
|
||||||
rootfs_dir, native_sysroot):
|
rootfs_dir, native_sysroot):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -25,7 +25,7 @@ class RawCopyPlugin(SourcePlugin):
|
||||||
name = 'rawcopy'
|
name = 'rawcopy'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_install_disk(self, disk, disk_name, cr, workdir, oe_builddir,
|
def do_install_disk(cls, disk, disk_name, cr, workdir, oe_builddir,
|
||||||
bootimg_dir, kernel_dir, native_sysroot):
|
bootimg_dir, kernel_dir, native_sysroot):
|
||||||
"""
|
"""
|
||||||
Called after all partitions have been prepared and assembled into a
|
Called after all partitions have been prepared and assembled into a
|
||||||
|
@ -34,7 +34,7 @@ class RawCopyPlugin(SourcePlugin):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_configure_partition(self, part, source_params, cr, cr_workdir,
|
def do_configure_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir,
|
oe_builddir, bootimg_dir, kernel_dir,
|
||||||
native_sysroot):
|
native_sysroot):
|
||||||
"""
|
"""
|
||||||
|
@ -44,7 +44,7 @@ class RawCopyPlugin(SourcePlugin):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_prepare_partition(self, part, source_params, cr, cr_workdir,
|
def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir,
|
oe_builddir, bootimg_dir, kernel_dir,
|
||||||
rootfs_dir, native_sysroot):
|
rootfs_dir, native_sysroot):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -54,7 +54,7 @@ class RootfsPlugin(SourcePlugin):
|
||||||
return image_rootfs_dir
|
return image_rootfs_dir
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_prepare_partition(self, part, source_params, cr, cr_workdir,
|
def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir,
|
oe_builddir, bootimg_dir, kernel_dir,
|
||||||
krootfs_dir, native_sysroot):
|
krootfs_dir, native_sysroot):
|
||||||
"""
|
"""
|
||||||
|
@ -77,7 +77,7 @@ class RootfsPlugin(SourcePlugin):
|
||||||
msg += " or it is not a valid path, exiting"
|
msg += " or it is not a valid path, exiting"
|
||||||
msger.error(msg % part.rootfs)
|
msger.error(msg % part.rootfs)
|
||||||
|
|
||||||
real_rootfs_dir = self.__get_rootfs_dir(rootfs_dir)
|
real_rootfs_dir = cls.__get_rootfs_dir(rootfs_dir)
|
||||||
|
|
||||||
part.set_rootfs(real_rootfs_dir)
|
part.set_rootfs(real_rootfs_dir)
|
||||||
part.prepare_rootfs(cr_workdir, oe_builddir, real_rootfs_dir, native_sysroot)
|
part.prepare_rootfs(cr_workdir, oe_builddir, real_rootfs_dir, native_sysroot)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user