[Pkg-privacy-commits] [tails-installer] 19/34: Set up the log handler before we start doing actions that log stuff.

anonym anonym-tails-guest at moszumanska.debian.org
Mon Jan 22 14:05:32 UTC 2018


This is an automated email from the git hooks/post-receive script.

anonym-tails-guest pushed a commit to branch tails/master
in repository tails-installer.

commit 4a6d50a737c91a18b997219e320a229c95601ef7
Author: intrigeri <intrigeri at boum.org>
Date:   Sat Jan 20 14:08:55 2018 +0000

    Set up the log handler before we start doing actions that log stuff.
---
 tails_installer/gui.py | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/tails_installer/gui.py b/tails_installer/gui.py
index b5e5a8c..6f10a56 100755
--- a/tails_installer/gui.py
+++ b/tails_installer/gui.py
@@ -316,6 +316,12 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
         self.opts.clone = is_running_from_tails()
         self.live = TailsInstallerCreator(opts=opts)
 
+        # Intercept all tails_installer.INFO log messages, and display them in the gui
+        self.handler = TailsInstallerLogHandler(lambda x: self.append_to_log(x))
+        self.live.log.addHandler(self.handler)
+        if not self.opts.verbose:
+            self.live.log.removeHandler(self.live.stream_handler)
+
         # Initialize the visibility and state of the clone/ISO source
         # selection widgets. This triggers on_radio_button_source_iso_toggled
         # that will in turn initialize self.live.source, self.source_available,
@@ -343,12 +349,6 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
         self.confirmed = False
         self.delete_existing_liveos_confirmed = False
 
-        # Intercept all tails_installer.INFO log messages, and display them in the gui
-        self.handler = TailsInstallerLogHandler(lambda x: self.append_to_log(x))
-        self.live.log.addHandler(self.handler)
-        if not self.opts.verbose:
-            self.live.log.removeHandler(self.live.stream_handler)
-
         # If an ISO was specified on the command line, use it.
         if args:
             for arg in self.args:
@@ -416,14 +416,17 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
         self.__image_header.override_background_color(Gtk.StateFlags.NORMAL, rgba)
 
     def on_radio_button_source_iso_toggled(self, radio_button):
+        self.live.log.debug("Entering on_radio_button_source_iso_toggled")
         active_radio = [r for r in radio_button.get_group() if r.get_active()][0]
         if active_radio.get_label() == "Clone the current Tails":
+            self.live.log.debug("Mode: clone")
             self.opts.clone = True
             self.live.source = RunningLiveSystemSource(
                 path=config['running_liveos_mountpoint'])
             self.source_available = True
             self.__filechooserbutton_source_file.set_sensitive(False)
         elif active_radio.get_label() == "Use a downloaded Tails ISO image":
+            self.live.log.debug("Mode: from ISO")
             self.opts.clone = False
             self.live.source = None
             self.source_available = False
@@ -432,6 +435,8 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
         self.clear_log()
         # some previously rejected devices may now be valid candidates
         # and vice-versa
+        self.live.log.debug("Calling populate_devices()"
+                            " from on_radio_button_source_iso_toggled")
         self.populate_devices()
 
     def on_force_reinstall_clicked(self, button):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git



More information about the Pkg-privacy-commits mailing list