[Pkg-privacy-commits] [torbrowser-launcher] 17/28: If installed version is older than min_version, download fresh copy

Ulrike Uhlig u-guest at moszumanska.debian.org
Sun Jul 10 21:18:17 UTC 2016


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

u-guest pushed a commit to branch debian/sid
in repository torbrowser-launcher.

commit 709aee462344278757738804a74c31c7fca4a5ee
Author: Micah Lee <micah at micahflee.com>
Date:   Fri Jul 8 12:42:58 2016 -0700

    If installed version is older than min_version, download fresh copy
---
 torbrowser_launcher/launcher.py | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py
index fde82cd..c7280ef 100644
--- a/torbrowser_launcher/launcher.py
+++ b/torbrowser_launcher/launcher.py
@@ -64,7 +64,7 @@ class Launcher:
         self.launch_gui = True
 
         # if Tor Browser is not installed, detect latest version, download, and install
-        if not self.common.settings['installed']:
+        if not self.common.settings['installed'] or not self.check_min_version():
             # if downloading over Tor, include txsocksx
             if self.common.settings['download_over_tor']:
                 try:
@@ -78,9 +78,16 @@ class Launcher:
                     self.common.settings['download_over_tor'] = False
                     self.common.save_settings()
 
+            # different message if downloading for the first time, or because your installed version is too low
+            download_message = ""
+            if not self.common.settings['installed']:
+                download_message = _("Downloading and installing Tor Browser for the first time.")
+            elif not self.check_min_version():
+                download_message = _("Your version of Tor Browser is out-of-date. Downloading and installing the newest version.")
+
             # download and install
-            print _("Downloading and installing Tor Browser for the first time.")
-            self.set_gui('task', _("Downloading and installing Tor Browser for the first time."),
+            print download_message
+            self.set_gui('task', download_message,
                          ['download_version_check',
                           'set_version',
                           'download_sig',

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



More information about the Pkg-privacy-commits mailing list