Add an option to DiskDevice's mount method to allow readonly mount
self.progressbar.goto((position * 100) // total)
self.progressbar.goto((position * 100) // total)
+ def mount(self, readonly=False):
"""Mount all disk partitions in a correct order."""
"""Mount all disk partitions in a correct order."""
+ mount = self.g.mount_ro if readonly else self.g.mount
self.out.output("Mounting image...", False)
mps = self.g.inspect_get_mountpoints(self.root)
self.out.output("Mounting image...", False)
mps = self.g.inspect_get_mountpoints(self.root)
mps.sort(compare)
for mp, dev in mps:
try:
mps.sort(compare)
for mp, dev in mps:
try:
except RuntimeError as msg:
self.out.warn("%s (ignored)" % msg)
self.out.success("done")
except RuntimeError as msg:
self.out.warn("%s (ignored)" % msg)
self.out.success("done")