diff options
Diffstat (limited to 'backend/magiback')
-rwxr-xr-x | backend/magiback | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/backend/magiback b/backend/magiback index e1ec093..6bf0202 100755 --- a/backend/magiback +++ b/backend/magiback @@ -10,7 +10,8 @@ import logging DEAMON_ORG = 'org.mageia.Magiback' DEAMON_INTERFACE = DEAMON_ORG ISODUMPER_INTERFACE = DEAMON_ORG + ".Isodumper" -logging.basicConfig(filename="/var/log/magiback.log",level=logging.DEBUG) +logging.basicConfig(filename="/var/log/magiback.log",format='%(asctime)s %(levelname)-8s %(message)s', + datefmt='%Y-%m-%d %H:%M:%S',level=logging.DEBUG) class Isodumper(raw_write.Dumper): """ @@ -61,6 +62,7 @@ class Isodumper(raw_write.Dumper): # Call translation catalog gettext.install(APP, localedir=DIR,) self.finished = threading.Event() + # finished is cleared at start of operation, and set at the end self.finished.clear() self._progress = 0 self.loop = GLib.MainLoop() @@ -84,7 +86,8 @@ class Isodumper(raw_write.Dumper): self.writing_perm = True self.writing_target = target else: - self.return_message = "Access denied" + self.return_message = "Writing: Access denied" + logging.debug(self.return_message) self.finished.set() def do_persistence(self, target, label): @@ -92,7 +95,7 @@ class Isodumper(raw_write.Dumper): if self.writing_perm and self.writing_target == target : self._do_persistence(target, label) else: - self.return_message = "Access denied" + self.return_message = "Persistence: Access denied" self.writing_perm = False self.writing_target = "" @@ -120,7 +123,6 @@ class Isodumper(raw_write.Dumper): return self._progress def do_unmount(self, device): - print("Unmounting") return self._do_unmount([device]) def get_sum(self, source): @@ -191,3 +193,4 @@ if __name__ == '__main__': ("Isodumper", Isodumper())) loop = GLib.MainLoop() loop.run() + logging.shutdown() |