summaryrefslogtreecommitdiffstats
path: root/scripts/lib
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:30:07 +0100
commit7724e6fff7b9afd2e24b4f20139e99199d53f1ce (patch)
tree075fa3f5d1d33431237d4a2069ddcefed1ecd97b /scripts/lib
parentcdef76e42414c092667761f8d9476e0d29828e75 (diff)
downloadpoky-7724e6fff7b9afd2e24b4f20139e99199d53f1ce.tar.gz
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. (From OE-Core rev: 1186fd8fd4a4789dc7c60feb86cc9fdd03fee7b3) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-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 303f323b83..eafc6c783e 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -254,12 +254,13 @@ class Disk:
254 if not self.parted: 254 if not self.parted:
255 raise WicError("Can't find executable parted") 255 raise WicError("Can't find executable parted")
256 256
257 self.partitions = self.get_partitions()
258
257 def __del__(self): 259 def __del__(self):
258 for path in self._partimages.values(): 260 for path in self._partimages.values():
259 os.unlink(path) 261 os.unlink(path)
260 262
261 @property 263 def get_partitions(self):
262 def partitions(self):
263 if self._partitions is None: 264 if self._partitions is None:
264 self._partitions = OrderedDict() 265 self._partitions = OrderedDict()
265 out = exec_cmd("%s -sm %s unit B print" % (self.parted, self.imagepath)) 266 out = exec_cmd("%s -sm %s unit B print" % (self.parted, self.imagepath))