diff options
author | Ivan Alejandro <ivanalejandro0@gmail.com> | 2014-07-10 11:10:08 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2014-07-10 11:10:08 -0300 |
commit | 11c95ac4c8281b6f51aa0e61a4bf13159f664855 (patch) | |
tree | 172e9410017c87847730d4ead0e3bd41cf6975b0 /src/leap/bitmask/provider/pinned.py | |
parent | 4793149d6d1276feaabcc89b90f209dc70355b20 (diff) |
Use preferred provider on first run. Closes #5813.
Diffstat (limited to 'src/leap/bitmask/provider/pinned.py')
-rw-r--r-- | src/leap/bitmask/provider/pinned.py | 10 |
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): |