[Pkg-privacy-commits] [tails-installer] 63/70: Remove the useless `user_force_reinstall` option.

Ulrike Uhlig ulrike at moszumanska.debian.org
Mon Nov 20 14:55:05 UTC 2017


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

ulrike pushed a commit to annotated tag tails-installer_4.20
in repository tails-installer.

commit 47edf4db36f114250803ae0b59c3d9bf3f6a782e
Author: anonym <anonym at riseup.net>
Date:   Wed Sep 20 13:46:09 2017 +0200

    Remove the useless `user_force_reinstall` option.
    
    It's not usable, and just adds dead code.
---
 tails_installer/gui.py | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/tails_installer/gui.py b/tails_installer/gui.py
index df2f574..b43c571 100755
--- a/tails_installer/gui.py
+++ b/tails_installer/gui.py
@@ -302,7 +302,6 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
         self.target_available = False
         self.target_selected  = False
         self.device_with_persistence = []
-        self.user_force_reinstall = False
         self.force_reinstall = False
 
         if self.opts.unprivileged == None:
@@ -448,23 +447,16 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
            return
         device = self.live.drives[drive]
 
-        # If device has not any valid recognized Tails partition
-        # Just create a new installation from scratch
-        if not self.live.device_can_be_upgraded(device):
-            self.opts.partition = True
-            self.__button_start.set_label(_('Install'))
-            self.__button_force_reinstall.set_visible(False)
-        # If there is valid Tails partition
-        elif self.user_force_reinstall:
-            self.opts.partition = True
-            self.force_reinstall = True
-            self.live.force_reinstall = True
-            self.__button_start.set_label(_('Upgrade'))
-        else:
+        if self.live.device_can_be_upgraded(device):
             self.opts.partition = False
             self.force_reinstall = False
+            self.live.force_reinstall = False
             self.__button_start.set_label(_('Upgrade'))
             self.__button_force_reinstall.set_visible(True)
+        else:
+            self.opts.partition = True
+            self.__button_start.set_label(_('Install'))
+            self.__button_force_reinstall.set_visible(False)
 
     def get_device_pretty_name(self, device):
         size = _format_bytes_in_gb(device['parent_size']

-- 
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