From 7798dcf9dd7c6a5f04bf82ded82661087d77a5e0 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 22 Feb 2019 21:38:20 +0100 Subject: [PATCH] index: keep mirrors in the order specified in config.py The mirrors are displayed in fdroidclient in the order they are received, and there might be some reason why a repo maintainer wants them in a specific order. The danger is that if the mirrors are set in config.py using "mirrors = {'foo', bar'}" they will have a randomized order since it will be in a set. They should be set using [] or () to have a fixed order. --- fdroidserver/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdroidserver/index.py b/fdroidserver/index.py index d8477dc5..29027a38 100644 --- a/fdroidserver/index.py +++ b/fdroidserver/index.py @@ -88,7 +88,7 @@ def make(apps, sortedids, apks, repodir, archive): mirrorcheckfailed = False mirrors = [] - for mirror in sorted(common.config.get('mirrors', [])): + for mirror in common.config.get('mirrors', []): base = os.path.basename(urllib.parse.urlparse(mirror).path.rstrip('/')) if common.config.get('nonstandardwebroot') is not True and base != 'fdroid': logging.error(_("mirror '%s' does not end with 'fdroid'!") % mirror)