[Pkg-privacy-commits] [torbrowser-launcher] 172/476: Mirrors from /usr/share and /usr/local; closes #69
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:21:34 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository torbrowser-launcher.
commit 7249c7ec8aa6e36c8fa66683cc810cdaec299242
Author: boyska <piuttosto at logorroici.org>
Date: Tue Dec 10 15:43:02 2013 +0100
Mirrors from /usr/share and /usr/local; closes #69
---
torbrowser-launcher | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/torbrowser-launcher b/torbrowser-launcher
index 7b8fb06..f4ea887 100755
--- a/torbrowser-launcher
+++ b/torbrowser-launcher
@@ -185,7 +185,8 @@ class TBLCommon:
'sebastian_key': '/usr/share/torbrowser-launcher/sebastian.asc',
'alexandre_key': '/usr/share/torbrowser-launcher/alexandre.asc',
'mike_key': '/usr/share/torbrowser-launcher/mike-2013-09.asc',
- 'mirrors_txt': '/usr/share/torbrowser-launcher/mirrors.txt',
+ 'mirrors_txt': ['/usr/share/torbrowser-launcher/mirrors.txt',
+ '/usr/local/share/torbrowser-launcher/mirrors.txt'],
'modem_sound': '/usr/share/torbrowser-launcher/modem.ogg',
'data_dir': tbb_data,
'download_dir': tbb_data+'/download',
@@ -242,8 +243,13 @@ class TBLCommon:
# load mirrors
def load_mirrors(self):
self.mirrors = []
- for mirror in open(self.paths['mirrors_txt'], 'r').readlines():
- self.mirrors.append(mirror.strip())
+ for srcfile in self.paths['mirrors_txt']:
+ if not os.path.exists(srcfile):
+ print "Warning: can't load mirrors from %s" % srcfile
+ continue
+ for mirror in open(srcfile, 'r').readlines():
+ if mirror.strip() not in self.mirrors:
+ self.mirrors.append(mirror.strip())
# load settings
def load_settings(self):
@@ -289,7 +295,7 @@ class TBLCommon:
if settings['tbl_version'] != self.tbl_version:
settings['tbl_version'] = self.tbl_version
resave = True
-
+
self.settings = settings
if resave:
self.save_settings()
--
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