aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlib/isodumper.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py
index e0a829c..1f03cc4 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -165,7 +165,7 @@ class IsoDumper(object):
break
def sizeof_fmt(self, num):
- #I18N these are units for files size
+ # I18N these are units for files size
for unit in [_('B'),_('KiB'),_('MiB'),_('GiB'),_('TiB')]:
if abs(num) < 1024.0:
return "%3.3f %s" % (num, unit)
@@ -265,7 +265,7 @@ class IsoDumper(object):
self.logger(_('Backup to:')+' '+dest)
bus = SystemBus()
iface = bus.get("org.mageia.Magiback","Isodumper")
- #Writing step
+ # Writing step
iface.do_write(source, dest, self.deviceSize)
progress = iface.progress
while not iface.done :
@@ -293,8 +293,6 @@ class IsoDumper(object):
self.progress.setEnabled()
source = self.img_name
target = self.dev.split('(')[1].split(')')[0]
-# self.logger(_('Image: ')+source)
-# self.logger(_('Target Device: ')+self.dev)
b = os.path.getsize(source)
if b > (self.deviceSize):
message = _('The device is too small to contain the ISO file.')
@@ -314,10 +312,10 @@ class IsoDumper(object):
self.progress.setLabel(_('Writing {source} to {target}').format(source=source.split('/')[-1],target=target.split('/')[-1]))
self.logger(_('Executing copy from ')+source+_(' to ')+target)
bus = SystemBus()
- iface = bus.get("org.mageia.Magiback","Isodumper")
+ iface = bus.get("org.mageia.Magiback", "Isodumper")
success, message = iface.do_unmount(target)
if success:
- #Writing step
+ # Writing step
iface.do_write(source, target, b)
iface.get_sum(source)
progress = iface.progress
@@ -353,15 +351,15 @@ class IsoDumper(object):
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())
+ iface.do_persistence(target,"mgalive-persist", self.cryptkey.value())
if iface.state:
self.logger(_("Added encrypted persistent partition"))
else:
self.logger(iface.message)
else:
- iface.do_persistence(target,"mgalive-persist", "")
+ iface.do_persistence(target, "mgalive-persist", "")
self.logger(_("Added persistent partition"))
- #Unmount if partitions are automatically mounted and then eject
+ # Unmount if partitions are automatically mounted and then eject
success, message = iface.do_unmount(target)
if success:
self.u.eject(target)
@@ -483,7 +481,7 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog
# Call translation catalog
gettext.install(APP, localedir=DIR, names=('ngettext',))
- #Check that there is no other instance running
+ # Check that there is no other instance running
current_pid = psutil.Process().pid
for pid in psutil.pids():
p = psutil.Process(pid)
@@ -494,7 +492,7 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog
exit()
- #TODO Read log level from command line
+ # TODO Read log level from command line
# define size of the selected device
self.deviceSize=0
@@ -609,7 +607,6 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog
def ask_format(self):
atelier = yui.YUI.widgetFactory()
dialog = atelier.createPopupDialog()
-# dialog.setTitle(_("Choose format"))
vb=atelier.createVBox(dialog)
label = atelier.createInputField(vb,_("Label for the device:"))
cr = atelier.createRadioButtonGroup(vb)