[Pkg-privacy-commits] [torbrowser-launcher] 10/48: prepare for TBB 4 series change to RecommendedTBBVersion (#132)
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:22:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository torbrowser-launcher.
commit 8b2eb1767597e4de3923211eb1715f9f2dc9faaf
Author: Micah Lee <micah at micahflee.com>
Date: Tue Sep 30 23:10:05 2014 +0000
prepare for TBB 4 series change to RecommendedTBBVersion (#132)
---
torbrowser_launcher/launcher.py | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py
index 5172512..619416a 100644
--- a/torbrowser_launcher/launcher.py
+++ b/torbrowser_launcher/launcher.py
@@ -497,6 +497,9 @@ class Launcher:
versions = json.load(open(self.common.paths['update_check_file']))
latest = None
+ # TODO: after TBB 4.0 is released, refactor this section
+ # to not filter linux versions (#132)
+
# filter linux versions
valid = []
for version in versions:
@@ -504,18 +507,20 @@ class Launcher:
valid.append(str(version))
valid.sort()
if len(valid):
- if len(valid) == 1:
- latest = valid.pop()
+ versions = valid
+
+ if len(versions) == 1:
+ latest = versions.pop()
+ else:
+ stable = []
+ # remove alphas/betas
+ for version in versions:
+ if '-alpha-' not in version and '-beta-' not in version:
+ stable.append(version)
+ if len(stable):
+ latest = stable.pop()
else:
- stable = []
- # remove alphas/betas
- for version in valid:
- if '-alpha-' not in version and '-beta-' not in version:
- stable.append(version)
- if len(stable):
- latest = stable.pop()
- else:
- latest = valid.pop()
+ latest = versions.pop()
if latest:
self.common.settings['latest_version'] = latest[:-len('-Linux')]
--
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