[OE-core] [PATCH 1/9] wic: partitionedfs: merged __format_disks and create
Ed Bartosh
ed.bartosh at linux.intel.com
Wed Feb 8 18:51:25 UTC 2017
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 at linux.intel.com>
---
scripts/lib/wic/utils/partitionedfs.py | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 5fc5765..08ae52f 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
--
2.1.4
More information about the Openembedded-core
mailing list