aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG4
-rwxr-xr-xbackend/raw_write.py2
-rwxr-xr-xlib/isodumper.py26
3 files changed, 27 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG
index c5a6325..295d5f5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,9 @@
The modifications are:
+IsoDumper 1.29
+--------------
+ - Fix logging when ~/.isodumper doesn't exist
+
IsoDumper 1.28
--------------
- Fix creating ~/.isodumper for logging when not yet existing
diff --git a/backend/raw_write.py b/backend/raw_write.py
index 1c1e216..154b2ad 100755
--- a/backend/raw_write.py
+++ b/backend/raw_write.py
@@ -127,12 +127,12 @@ class Dumper(object):
def _get_sum(self, source):
self.return_state = False
- mageia_keyid = "835E41F4EDCA7A90"
logging.debug("Starting getting sum")
# Check if the sum file has a valid signature
gpg = gnupg.GPG()
gpg.encoding = 'utf-8'
# Use Mageia public key
+ mageia_keyid = "835E41F4EDCA7A90"
self.sum_type = 'sha3'
sig_file = "{}.{}.gpg".format(source, self.sum_type)
self.source_file = "{}.{}".format(source, self.sum_type)
diff --git a/lib/isodumper.py b/lib/isodumper.py
index d868cfb..12b3eb5 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -149,7 +149,6 @@ class UDisks2(object):
i_drive = self.bus.get(self.SERVICE, drive)
i_drive.Eject({})
-
class Info(object):
def __init__(self, title, richtext, text):
self.title = title
@@ -178,6 +177,16 @@ class IsoDumper(basedialog.BaseDialog):
self.devicelist.addItem(str(name + ' (' + path.lstrip() + ') ' + self.sizeof_fmt(size)), False)
return True
+ def active_signal(self):
+ print("Active")
+ self.u.iface["org.freedesktop.DBus.ObjectManager"].InterfacesAdded.connect(self.refresh_signal)
+ self.u.iface["org.freedesktop.DBus.ObjectManager"].InterfacesRemoved.connect(self.refresh_signal)
+
+ def deactive_signal(self):
+ print("Désactive")
+ #self.u.iface["org.freedesktop.DBus.ObjectManager"].onInterfacesAdded = None
+ #self.u.iface["org.freedesktop.DBus.ObjectManager"].onInterfacesRemoved = None
+
def udev_wait(self, operation):
wait = Popen(["udevadm", "settle", "--timeout=15"], stderr=PIPE)
wait.communicate()
@@ -204,6 +213,12 @@ class IsoDumper(basedialog.BaseDialog):
self.dialog.recalcLayout()
self.restore()
+ def refresh_signal(self, device, params):
+ print("Refresh ", device)
+ self.devicelist.deleteAllItems()
+ self.get_devices()
+ self.dialog.recalcLayout()
+
def device_selected(self):
selitem = self.devicelist.selectedItem()
if selitem is not None:
@@ -212,8 +227,9 @@ class IsoDumper(basedialog.BaseDialog):
if self.dev.startswith(name + ' (' + path.lstrip()):
self.deviceSize = size
self.device_name = name.rstrip().replace(' ', '')
- self.logger(_('Target Device: ') + self.dev)
- logging.info(_('Target Device: {}').format(self.dev))
+ message = _('Target Device: {}').format(self.dev)
+ self.logger(message)
+ logging.info(message)
self.formatbt.setEnabled()
self.ima.setEnabled()
self.backup_select.setEnabled()
@@ -391,6 +407,7 @@ class IsoDumper(basedialog.BaseDialog):
message = _('Executing copy from {source} to {target}').format(source=source, target=target)
self.logger(message)
logging.info(message)
+ self.deactive_signal()
bus = SystemBus()
iface = bus.get("org.mageia.Magiback", "Isodumper")
success, message = self.u.do_unmount(target)
@@ -479,6 +496,7 @@ class IsoDumper(basedialog.BaseDialog):
self.restore()
else:
self.restore()
+ self.active_signal()
def success(self):
self.operation = False
@@ -715,12 +733,12 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog
except:
message = _('UDisks2 is not available on your system')
logging.error(message)
- self.logger(message)
self.emergency(message)
if not self.get_devices():
self.dialog.destroy()
yui.YUILoader.deleteUI()
exit()
+ self.active_signal()
self.device_selected()
self.dialog.recalcLayout()
self.uEventQueue = SimpleQueue()