diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-01-14 14:12:58 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-17 11:32:19 +0000 |
commit | 7cf236047fa5d0d947fd214181c9a63ccb2509ac (patch) | |
tree | da62ac08c17c0a5832dc6495621acda1b4e7f24c /scripts/lib/wic | |
parent | 51ec52a62ce49d1a1a83489379990f78cfe849f9 (diff) | |
download | openembedded-core-7cf236047fa5d0d947fd214181c9a63ccb2509ac.tar.gz openembedded-core-7cf236047fa5d0d947fd214181c9a63ccb2509ac.tar.bz2 openembedded-core-7cf236047fa5d0d947fd214181c9a63ccb2509ac.zip |
wic: get rid of set_size and set_source_file setters
Used size and source_file attributes instead of using
setters. It's more pythonic, clear an consistent.
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')
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-efi.py | 4 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-pcbios.py | 4 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index 35afa30ea6..8bfa3a96ce 100644 --- a/scripts/lib/wic/plugins/source/bootimg-efi.py +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py @@ -235,5 +235,5 @@ class BootimgEFIPlugin(SourcePlugin): out = exec_cmd(du_cmd) bootimg_size = out.split()[0] - part.set_size(bootimg_size) - part.set_source_file(bootimg) + part.size = bootimg_size + part.source_file = bootimg diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py index 255684b386..e84bddf15d 100644 --- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py @@ -205,7 +205,7 @@ class BootimgPcbiosPlugin(SourcePlugin): out = exec_cmd(du_cmd) bootimg_size = out.split()[0] - part.set_size(bootimg_size) - part.set_source_file(bootimg) + part.size = int(out.split()[0]) + part.source_file = bootimg diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py index b5ca4d39f6..daefff3927 100644 --- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py +++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py @@ -302,7 +302,7 @@ class IsoImagePlugin(SourcePlugin): # which contains rootfs du_cmd = "du -bks %s" % rootfs_dir out = exec_cmd(du_cmd) - part.set_size(int(out.split()[0])) + part.size = int(out.split()[0]) part.extra_space = 0 part.overhead_factor = 1.2 part.prepare_rootfs(cr_workdir, oe_builddir, rootfs_dir, \ @@ -502,8 +502,8 @@ class IsoImagePlugin(SourcePlugin): out = exec_cmd(du_cmd) isoimg_size = int(out.split()[0]) - part.set_size(isoimg_size) - part.set_source_file(iso_img) + part.size = isoimg_size + part.source_file = iso_img @classmethod def do_install_disk(cls, disk, disk_name, creator, workdir, oe_builddir, |