diff options
Diffstat (limited to 'scripts/lib/wic/engine.py')
-rw-r--r-- | scripts/lib/wic/engine.py | 5 |
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)) |