diff options
Diffstat (limited to 'lib/isodumper.py')
-rwxr-xr-x | lib/isodumper.py | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py index 4f77422..6e111b1 100755 --- a/lib/isodumper.py +++ b/lib/isodumper.py @@ -44,13 +44,12 @@ import time import os import re import gettext -from subprocess import call, Popen, PIPE +from subprocess import Popen, PIPE from pydbus import SystemBus -from gi.repository import GLib import psutil import manatools.args as args - + class NoUDisks2(Exception): @@ -122,7 +121,7 @@ class Info(object): class ParseCLI(args.AppArgs): def __init(self, command): super().__init__(command) - + class IsoDumper(object): def get_devices(self): @@ -346,18 +345,31 @@ class IsoDumper(object): self.logger(message) # Add persistent partition if asked if self.persistencecb.isChecked(): - self.logger(_("Adding persistent partition")) + self.progress.setLabel(_("Adding persistent partition")) + self.progress.setValue(0) if self.cryptcb.isChecked(): if self.cryptkey.value() == "": self.logger(_("No key for encrypted partition provided. Adding the partition aborted.")) else: iface.do_persistence(target,"mgalive-persist", self.cryptkey.value()) + progress = iface.progress + while not iface.done : + progress = iface.progress + self.progress.setValue(progress) + self.dialog.pollEvent() + time.sleep(.5) if iface.state: self.logger(_("Added encrypted persistent partition")) else: self.logger(iface.message) else: iface.do_persistence(target, "mgalive-persist", "") + progress = iface.progress + while not iface.done : + progress = iface.progress + self.progress.setValue(progress) + self.dialog.pollEvent() + time.sleep(.5) self.logger(_("Added persistent partition")) # Unmount if partitions are automatically mounted and then eject success, message = iface.do_unmount(target) @@ -365,7 +377,7 @@ class IsoDumper(object): self.u.eject(target) self.success() else: - emergency(message) + self.emergency(message) self.restore() else: self.emergency(message) |