Fix progress reporting
This commit is contained in:
parent
f371ffa696
commit
8867f6bc67
@ -125,6 +125,10 @@ class UnsquashOperation:
|
|||||||
shutil.rmtree(source_mount_path)
|
shutil.rmtree(source_mount_path)
|
||||||
|
|
||||||
def unsquash_image(self, entry, imgmountdir):
|
def unsquash_image(self, entry, imgmountdir):
|
||||||
|
def progress_cb(copied):
|
||||||
|
self.unpackstatus[entry.source].copied = copied
|
||||||
|
self.report_progress()
|
||||||
|
|
||||||
subprocess.check_call(["mount",
|
subprocess.check_call(["mount",
|
||||||
entry.source,
|
entry.source,
|
||||||
imgmountdir,
|
imgmountdir,
|
||||||
@ -132,7 +136,7 @@ class UnsquashOperation:
|
|||||||
try:
|
try:
|
||||||
file_copy(imgmountdir,
|
file_copy(imgmountdir,
|
||||||
entry.destination,
|
entry.destination,
|
||||||
self.report_progress)
|
progress_cb)
|
||||||
finally:
|
finally:
|
||||||
subprocess.check_call(["umount", "-l", imgmountdir])
|
subprocess.check_call(["umount", "-l", imgmountdir])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user