summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 83c42c9987..9ff4394757 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -291,7 +291,7 @@ class Disk:
291 291
292 def _get_part_image(self, pnum): 292 def _get_part_image(self, pnum):
293 if pnum not in self.partitions: 293 if pnum not in self.partitions:
294 raise WicError("Partition %s is not in the image") 294 raise WicError("Partition %s is not in the image" % pnum)
295 part = self.partitions[pnum] 295 part = self.partitions[pnum]
296 # check if fstype is supported 296 # check if fstype is supported
297 for fstype in self.fstypes: 297 for fstype in self.fstypes:
@@ -314,6 +314,9 @@ class Disk:
314 seek=self.partitions[pnum].start) 314 seek=self.partitions[pnum].start)
315 315
316 def dir(self, pnum, path): 316 def dir(self, pnum, path):
317 if pnum not in self.partitions:
318 raise WicError("Partition %s is not in the image" % pnum)
319
317 if self.partitions[pnum].fstype.startswith('ext'): 320 if self.partitions[pnum].fstype.startswith('ext'):
318 return exec_cmd("{} {} -R 'ls -l {}'".format(self.debugfs, 321 return exec_cmd("{} {} -R 'ls -l {}'".format(self.debugfs,
319 self._get_part_image(pnum), 322 self._get_part_image(pnum),