[Pkg-privacy-commits] [tails-installer] 14/34: Don't trigger code that relies on self.live before it has been defined.
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 fc533fa0b663c9697e26a3d859da116181aa8ba4
Author: intrigeri <intrigeri at boum.org>
Date: Sat Jan 20 13:39:10 2018 +0000
Don't trigger code that relies on self.live before it has been defined.
Calling self.__radio_button_source_device.set_active(True) triggers
the on_radio_button_source_iso_toggled callback that now uses methods
provided by the self.live object. So let's ensure that one is defined
before we manipulate the state of the radio buttons.
---
tails_installer/gui.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tails_installer/gui.py b/tails_installer/gui.py
index 9816ebc..b9623f7 100755
--- a/tails_installer/gui.py
+++ b/tails_installer/gui.py
@@ -313,19 +313,19 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
self._build_ui()
+ self.opts.clone = is_running_from_tails()
+ self.live = TailsInstallerCreator(opts=opts)
+
# Inside tails
- if is_running_from_tails():
- self.opts.clone = True
+ if self.opts.clone:
self.__radio_button_source_device.set_active(True)
self.__filechooserbutton_source_file.set_sensitive(False)
# Outside
else:
- self.opts.clone = False
self.__radio_button_source_device.set_visible(False)
self.__filechooserbutton_source_file.set_sensitive(True)
self.__box_source_dl.set_visible(False)
- self.live = TailsInstallerCreator(opts=opts)
if self.opts.clone:
self.live.source = RunningLiveSystemSource(
path=config['running_liveos_mountpoint'])
--
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