summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/engine.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic/engine.py')
-rw-r--r--scripts/lib/wic/engine.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 18776fa8a0..4ccca482e7 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -290,7 +290,7 @@ class Disk:
290 290
291 def _get_part_image(self, pnum): 291 def _get_part_image(self, pnum):
292 if pnum not in self.partitions: 292 if pnum not in self.partitions:
293 raise WicError("Partition %s is not in the image") 293 raise WicError("Partition %s is not in the image" % pnum)
294 part = self.partitions[pnum] 294 part = self.partitions[pnum]
295 # check if fstype is supported 295 # check if fstype is supported
296 for fstype in self.fstypes: 296 for fstype in self.fstypes:
@@ -313,6 +313,9 @@ class Disk:
313 seek=self.partitions[pnum].start) 313 seek=self.partitions[pnum].start)
314 314
315 def dir(self, pnum, path): 315 def dir(self, pnum, path):
316 if pnum not in self.partitions:
317 raise WicError("Partition %s is not in the image" % pnum)
318
316 if self.partitions[pnum].fstype.startswith('ext'): 319 if self.partitions[pnum].fstype.startswith('ext'):
317 return exec_cmd("{} {} -R 'ls -l {}'".format(self.debugfs, 320 return exec_cmd("{} {} -R 'ls -l {}'".format(self.debugfs,
318 self._get_part_image(pnum), 321 self._get_part_image(pnum),