Names with one leasding underscore considered protected in Python.
_ptable_format is accessed outside of its class.
Made it public by removing underscore.
This pylint warning should be fixed now:
Access to a protected member _ptable_format of a client class
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
self.__disks = {}
self.__disk_format = "direct"
self._disk_names = []
- self._ptable_format = self.ks.handler.bootloader.ptable
+ self.ptable_format = self.ks.handler.bootloader.ptable
self.oe_builddir = oe_builddir
if image_output_dir:
if n == num:
if p.no_table:
return 0
- if self._ptable_format == 'msdos' and realnum > 3:
+ if self.ptable_format == 'msdos' and realnum > 3:
# account for logical partition numbering, ex. sda5..
return realnum + 1
return realnum
self._restore_fstab(fstab)
- self.__image.layout_partitions(self._ptable_format)
+ self.__image.layout_partitions(self.ptable_format)
self.__imgdir = self.workdir
for disk_name, disk in self.__image.disks.items():
kernel = "/bzImage"
- if cr._ptable_format in ('msdos', 'gpt'):
+ if cr.ptable_format in ('msdos', 'gpt'):
rootstr = rootdev
else:
raise ImageError("Unsupported partition table format found")
kernel = "/bzImage"
- if cr._ptable_format in ('msdos', 'gpt'):
+ if cr.ptable_format in ('msdos', 'gpt'):
rootstr = rootdev
else:
raise ImageError("Unsupported partition table format found")
disk image. In this case, we install the MBR.
"""
mbrfile = "%s/syslinux/" % bootimg_dir
- if cr._ptable_format == 'msdos':
+ if cr.ptable_format == 'msdos':
mbrfile += "mbr.bin"
- elif cr._ptable_format == 'gpt':
+ elif cr.ptable_format == 'gpt':
mbrfile += "gptmbr.bin"
else:
- msger.error("Unsupported partition table: %s" % cr._ptable_format)
+ msger.error("Unsupported partition table: %s" % cr.ptable_format)
if not os.path.exists(mbrfile):
msger.error("Couldn't find %s. If using the -e option, do you have the right MACHINE set in local.conf? If not, is the bootimg_dir path correct?" % mbrfile)
kernel = "/vmlinuz"
syslinux_conf += "KERNEL " + kernel + "\n"
- if cr._ptable_format in ('msdos', 'gpt'):
+ if cr.ptable_format in ('msdos', 'gpt'):
rootstr = rootdev
else:
raise ImageError("Unsupported partition table format found")
syslinux_conf += "LABEL linux\n"
syslinux_conf += " KERNEL /boot/bzImage\n"
- if image_creator._ptable_format in ('msdos', 'gpt'):
+ if image_creator.ptable_format in ('msdos', 'gpt'):
rootstr = rootdev
else:
raise ImageError("Unsupported partition table format found")
disk image. In this case, we install the MBR.
"""
mbrfile = os.path.join(native_sysroot, "usr/share/syslinux/")
- if image_creator._ptable_format == 'msdos':
+ if image_creator.ptable_format == 'msdos':
mbrfile += "mbr.bin"
- elif image_creator._ptable_format == 'gpt':
+ elif image_creator.ptable_format == 'gpt':
mbrfile += "gptmbr.bin"
else:
msger.error("Unsupported partition table: %s" % \
- image_creator._ptable_format)
+ image_creator.ptable_format)
if not os.path.exists(mbrfile):
msger.error("Couldn't find %s. Has syslinux-native been baked?" % mbrfile)