aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-08-25 23:12:28 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-27 22:29:46 +0100
commit1186fd8fd4a4789dc7c60feb86cc9fdd03fee7b3 (patch)
treea3e72c2501bb74d5203787eb5ca560b0f24a0df5
parentac5fc0d691aad66ac01a5cde34c331c928e9e25a (diff)
downloadopenembedded-core-contrib-1186fd8fd4a4789dc7c60feb86cc9fdd03fee7b3.tar.gz
openembedded-core-contrib-1186fd8fd4a4789dc7c60feb86cc9fdd03fee7b3.tar.bz2
openembedded-core-contrib-1186fd8fd4a4789dc7c60feb86cc9fdd03fee7b3.zip
wic: always read image partitions
Got rid of lazy evaluation of self.partitions property. It's not needed because partitions of the source image should be always read. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/wic/engine.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 303f323b838..eafc6c783ec 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -254,12 +254,13 @@ class Disk:
if not self.parted:
raise WicError("Can't find executable parted")
+ self.partitions = self.get_partitions()
+
def __del__(self):
for path in self._partimages.values():
os.unlink(path)
- @property
- def partitions(self):
+ def get_partitions(self):
if self._partitions is None:
self._partitions = OrderedDict()
out = exec_cmd("%s -sm %s unit B print" % (self.parted, self.imagepath))