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.

(From OE-Core rev: b76b1bd404487df38fd99bc0d0e6a59acb10c9d3)

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:
Ed Bartosh 2017-02-08 20:51:25 +02:00 committed by Richard Purdie
parent 03648d3d04
commit b8354df789
1 changed files with 5 additions and 10 deletions

View File

@ -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