summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-02-08 20:51:25 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-15 20:06:32 -0800
commitb76b1bd404487df38fd99bc0d0e6a59acb10c9d3 (patch)
tree604123875644be5ad51528d38e2f5915a7fcedc4
parent8b62ac7e1de9e76e5fde9f741da8c224384298ad (diff)
downloadopenembedded-core-b76b1bd404487df38fd99bc0d0e6a59acb10c9d3.tar.gz
openembedded-core-b76b1bd404487df38fd99bc0d0e6a59acb10c9d3.tar.bz2
openembedded-core-b76b1bd404487df38fd99bc0d0e6a59acb10c9d3.zip
wic: partitionedfs: merged __format_disks and create
Private method __format_disks is called only from create method making the code less readable. Merged the code into one method. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--scripts/lib/wic/utils/partitionedfs.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 5fc5765d65..08ae52f3e5 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -238,7 +238,11 @@ class Image():
return exec_native_cmd(cmd, self.native_sysroot)
- def __format_disks(self):
+ def create(self):
+ for dev in self.disks:
+ disk = self.disks[dev]
+ disk['disk'].create()
+
self.layout_partitions()
for dev in self.disks:
@@ -375,12 +379,3 @@ class Image():
partimage = image_file + '.p%d' % part['num']
os.rename(source, partimage)
self.partimages.append(partimage)
-
- def create(self):
- for dev in self.disks:
- disk = self.disks[dev]
- disk['disk'].create()
-
- self.__format_disks()
-
- return