diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-06-02 17:02:03 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-11 23:59:10 +0100 |
commit | 9682d8f21e450c8f9e8bfa0a4077e14ef5d467da (patch) | |
tree | 56834880d3b6cdc5211376366c33f5d7d1d2f03f /scripts | |
parent | 179fb20603b31708226649c860d60dc6fa427b11 (diff) | |
download | poky-9682d8f21e450c8f9e8bfa0a4077e14ef5d467da.tar.gz |
wic: Make _ptable_format public
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
(From OE-Core rev: 72599b5500ebdd0c418a0ef1e2c93c833bd31d75)
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>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/imager/direct.py | 6 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-efi.py | 4 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-pcbios.py | 8 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py | 8 |
4 files changed, 13 insertions, 13 deletions
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 9a7d0f5117..83f9688878 100644 --- a/scripts/lib/wic/imager/direct.py +++ b/scripts/lib/wic/imager/direct.py | |||
@@ -62,7 +62,7 @@ class DirectImageCreator(BaseImageCreator): | |||
62 | self.__disks = {} | 62 | self.__disks = {} |
63 | self.__disk_format = "direct" | 63 | self.__disk_format = "direct" |
64 | self._disk_names = [] | 64 | self._disk_names = [] |
65 | self._ptable_format = self.ks.handler.bootloader.ptable | 65 | self.ptable_format = self.ks.handler.bootloader.ptable |
66 | 66 | ||
67 | self.oe_builddir = oe_builddir | 67 | self.oe_builddir = oe_builddir |
68 | if image_output_dir: | 68 | if image_output_dir: |
@@ -83,7 +83,7 @@ class DirectImageCreator(BaseImageCreator): | |||
83 | if n == num: | 83 | if n == num: |
84 | if p.no_table: | 84 | if p.no_table: |
85 | return 0 | 85 | return 0 |
86 | if self._ptable_format == 'msdos' and realnum > 3: | 86 | if self.ptable_format == 'msdos' and realnum > 3: |
87 | # account for logical partition numbering, ex. sda5.. | 87 | # account for logical partition numbering, ex. sda5.. |
88 | return realnum + 1 | 88 | return realnum + 1 |
89 | return realnum | 89 | return realnum |
@@ -276,7 +276,7 @@ class DirectImageCreator(BaseImageCreator): | |||
276 | 276 | ||
277 | self._restore_fstab(fstab) | 277 | self._restore_fstab(fstab) |
278 | 278 | ||
279 | self.__image.layout_partitions(self._ptable_format) | 279 | self.__image.layout_partitions(self.ptable_format) |
280 | 280 | ||
281 | self.__imgdir = self.workdir | 281 | self.__imgdir = self.workdir |
282 | for disk_name, disk in self.__image.disks.items(): | 282 | for disk_name, disk in self.__image.disks.items(): |
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index 22c7b0a33e..400e3a2df8 100644 --- a/scripts/lib/wic/plugins/source/bootimg-efi.py +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py | |||
@@ -61,7 +61,7 @@ class BootimgEFIPlugin(SourcePlugin): | |||
61 | 61 | ||
62 | kernel = "/bzImage" | 62 | kernel = "/bzImage" |
63 | 63 | ||
64 | if cr._ptable_format in ('msdos', 'gpt'): | 64 | if cr.ptable_format in ('msdos', 'gpt'): |
65 | rootstr = rootdev | 65 | rootstr = rootdev |
66 | else: | 66 | else: |
67 | raise ImageError("Unsupported partition table format found") | 67 | raise ImageError("Unsupported partition table format found") |
@@ -106,7 +106,7 @@ class BootimgEFIPlugin(SourcePlugin): | |||
106 | 106 | ||
107 | kernel = "/bzImage" | 107 | kernel = "/bzImage" |
108 | 108 | ||
109 | if cr._ptable_format in ('msdos', 'gpt'): | 109 | if cr.ptable_format in ('msdos', 'gpt'): |
110 | rootstr = rootdev | 110 | rootstr = rootdev |
111 | else: | 111 | else: |
112 | raise ImageError("Unsupported partition table format found") | 112 | raise ImageError("Unsupported partition table format found") |
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py index ab62b7a9e9..1c3c6e605c 100644 --- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py | |||
@@ -44,12 +44,12 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
44 | disk image. In this case, we install the MBR. | 44 | disk image. In this case, we install the MBR. |
45 | """ | 45 | """ |
46 | mbrfile = "%s/syslinux/" % bootimg_dir | 46 | mbrfile = "%s/syslinux/" % bootimg_dir |
47 | if cr._ptable_format == 'msdos': | 47 | if cr.ptable_format == 'msdos': |
48 | mbrfile += "mbr.bin" | 48 | mbrfile += "mbr.bin" |
49 | elif cr._ptable_format == 'gpt': | 49 | elif cr.ptable_format == 'gpt': |
50 | mbrfile += "gptmbr.bin" | 50 | mbrfile += "gptmbr.bin" |
51 | else: | 51 | else: |
52 | msger.error("Unsupported partition table: %s" % cr._ptable_format) | 52 | msger.error("Unsupported partition table: %s" % cr.ptable_format) |
53 | 53 | ||
54 | if not os.path.exists(mbrfile): | 54 | if not os.path.exists(mbrfile): |
55 | 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) | 55 | 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) |
@@ -104,7 +104,7 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
104 | kernel = "/vmlinuz" | 104 | kernel = "/vmlinuz" |
105 | syslinux_conf += "KERNEL " + kernel + "\n" | 105 | syslinux_conf += "KERNEL " + kernel + "\n" |
106 | 106 | ||
107 | if cr._ptable_format in ('msdos', 'gpt'): | 107 | if cr.ptable_format in ('msdos', 'gpt'): |
108 | rootstr = rootdev | 108 | rootstr = rootdev |
109 | else: | 109 | else: |
110 | raise ImageError("Unsupported partition table format found") | 110 | raise ImageError("Unsupported partition table format found") |
diff --git a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py index cdd7c84c12..50b221382c 100644 --- a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py +++ b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py | |||
@@ -101,7 +101,7 @@ class RootfsPlugin(SourcePlugin): | |||
101 | syslinux_conf += "LABEL linux\n" | 101 | syslinux_conf += "LABEL linux\n" |
102 | syslinux_conf += " KERNEL /boot/bzImage\n" | 102 | syslinux_conf += " KERNEL /boot/bzImage\n" |
103 | 103 | ||
104 | if image_creator._ptable_format in ('msdos', 'gpt'): | 104 | if image_creator.ptable_format in ('msdos', 'gpt'): |
105 | rootstr = rootdev | 105 | rootstr = rootdev |
106 | else: | 106 | else: |
107 | raise ImageError("Unsupported partition table format found") | 107 | raise ImageError("Unsupported partition table format found") |
@@ -170,13 +170,13 @@ class RootfsPlugin(SourcePlugin): | |||
170 | disk image. In this case, we install the MBR. | 170 | disk image. In this case, we install the MBR. |
171 | """ | 171 | """ |
172 | mbrfile = os.path.join(native_sysroot, "usr/share/syslinux/") | 172 | mbrfile = os.path.join(native_sysroot, "usr/share/syslinux/") |
173 | if image_creator._ptable_format == 'msdos': | 173 | if image_creator.ptable_format == 'msdos': |
174 | mbrfile += "mbr.bin" | 174 | mbrfile += "mbr.bin" |
175 | elif image_creator._ptable_format == 'gpt': | 175 | elif image_creator.ptable_format == 'gpt': |
176 | mbrfile += "gptmbr.bin" | 176 | mbrfile += "gptmbr.bin" |
177 | else: | 177 | else: |
178 | msger.error("Unsupported partition table: %s" % \ | 178 | msger.error("Unsupported partition table: %s" % \ |
179 | image_creator._ptable_format) | 179 | image_creator.ptable_format) |
180 | 180 | ||
181 | if not os.path.exists(mbrfile): | 181 | if not os.path.exists(mbrfile): |
182 | msger.error("Couldn't find %s. Has syslinux-native been baked?" % mbrfile) | 182 | msger.error("Couldn't find %s. Has syslinux-native been baked?" % mbrfile) |