summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/provider
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-01-23 17:07:02 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-01-23 17:09:43 -0300
commitd4e53f6cef9ba2b476cc8308f132d8af20e79156 (patch)
tree22976e7b07816140ecfd05855e201ff104937ac6 /src/leap/bitmask/provider
parent2cb7443595a91857a4d037f2385ade5c8385d6a4 (diff)
Replace provider hardcoded path with helper.
Also reorder some imports and remove unused ones.
Diffstat (limited to 'src/leap/bitmask/provider')
-rw-r--r--src/leap/bitmask/provider/providerbootstrapper.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/leap/bitmask/provider/providerbootstrapper.py b/src/leap/bitmask/provider/providerbootstrapper.py
index 2a66b78c..654d1790 100644
--- a/src/leap/bitmask/provider/providerbootstrapper.py
+++ b/src/leap/bitmask/provider/providerbootstrapper.py
@@ -24,17 +24,18 @@ import sys
import requests
+from leap.bitmask import provider
+from leap.bitmask import util
from leap.bitmask.config import flags
from leap.bitmask.config.providerconfig import ProviderConfig, MissingCACert
-from leap.bitmask.util.request_helpers import get_content
-from leap.bitmask import util
-from leap.bitmask.util.constants import REQUEST_TIMEOUT
+from leap.bitmask.provider import get_provider_path
from leap.bitmask.services.abstractbootstrapper import AbstractBootstrapper
-from leap.bitmask import provider
+from leap.bitmask.util.constants import REQUEST_TIMEOUT
+from leap.bitmask.util.request_helpers import get_content
from leap.common import ca_bundle
from leap.common.certs import get_digest
-from leap.common.files import check_and_fix_urw_only, get_mtime, mkdir_p
from leap.common.check import leap_assert, leap_assert_type, leap_check
+from leap.common.files import check_and_fix_urw_only, get_mtime, mkdir_p
logger = logging.getLogger(__name__)
@@ -166,8 +167,8 @@ class ProviderBootstrapper(AbstractBootstrapper):
headers = {}
domain = self._domain.encode(sys.getfilesystemencoding())
provider_json = os.path.join(util.get_path_prefix(),
- "leap", "providers", domain,
- "provider.json")
+ get_provider_path(domain))
+
mtime = get_mtime(provider_json)
if self._download_if_needed and mtime: