summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/provider/pinned.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-07-10 11:32:36 -0300
committerTomás Touceda <chiiph@leap.se>2014-07-10 11:32:36 -0300
commitc0cc3f6f13ef8bc3dadec86bede2b286cea4e966 (patch)
tree5588c3ab7725980d325f8717ba1298083f573ddf /src/leap/bitmask/provider/pinned.py
parent4793149d6d1276feaabcc89b90f209dc70355b20 (diff)
parent9a0760848f038dc0271b8c9adabf8aefe4db594e (diff)
Merge remote-tracking branch 'refs/remotes/ivan/feature/5813_wizard-providers-order' into develop
Diffstat (limited to 'src/leap/bitmask/provider/pinned.py')
-rw-r--r--src/leap/bitmask/provider/pinned.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/leap/bitmask/provider/pinned.py b/src/leap/bitmask/provider/pinned.py
index 38851621..6fd2fa70 100644
--- a/src/leap/bitmask/provider/pinned.py
+++ b/src/leap/bitmask/provider/pinned.py
@@ -32,6 +32,7 @@ class PinnedProviders(object):
CONFIG_KEY = "config"
CACERT_KEY = "cacert"
+ PREFERRED_PROVIDER = pinned_demobitmask.DOMAIN
PROVIDERS = {
pinned_demobitmask.DOMAIN: {
@@ -50,11 +51,16 @@ class PinnedProviders(object):
@classmethod
def domains(self):
"""
- Return the domains that are pinned in here
+ Return the domains that are pinned in here.
+ The first domain in the list is the preferred one.
:rtype: list of str
"""
- return self.PROVIDERS.keys()
+ domains = self.PROVIDERS.keys()
+ domains.remove(self.PREFERRED_PROVIDER)
+ domains.insert(0, self.PREFERRED_PROVIDER)
+
+ return domains
@classmethod
def save_hardcoded(self, domain, provider_path, cacert_path):