summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/provider/providerbootstrapper.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-12-02 12:01:18 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-12-02 12:03:41 -0300
commitd7a9ea8845461e765052733f62e77cd71a1cde82 (patch)
treebc3ae80e2cd91f78eb7e29c662ff8507d589a153 /src/leap/bitmask/provider/providerbootstrapper.py
parentcb8eb981d3646f3734390f12ed48910961c56e2b (diff)
Encode paths out.
Diffstat (limited to 'src/leap/bitmask/provider/providerbootstrapper.py')
-rw-r--r--src/leap/bitmask/provider/providerbootstrapper.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/leap/bitmask/provider/providerbootstrapper.py b/src/leap/bitmask/provider/providerbootstrapper.py
index a325a3e7..f5a2003f 100644
--- a/src/leap/bitmask/provider/providerbootstrapper.py
+++ b/src/leap/bitmask/provider/providerbootstrapper.py
@@ -161,10 +161,10 @@ class ProviderBootstrapper(AbstractBootstrapper):
# Watch out! We're handling the verify paramenter differently here.
headers = {}
+ domain = self._domain.encode(sys.getfilesystemencoding())
provider_json = os.path.join(util.get_path_prefix(),
- "leap",
- "providers",
- self._domain, "provider.json")
+ "leap", "providers", domain,
+ "provider.json")
mtime = get_mtime(provider_json)
if self._download_if_needed and mtime:
@@ -206,10 +206,8 @@ class ProviderBootstrapper(AbstractBootstrapper):
provider_config = ProviderConfig()
provider_config.load(data=provider_definition, mtime=mtime)
- provider_config.save(["leap",
- "providers",
- self._domain,
- "provider.json"])
+ provider_config.save(["leap", "providers",
+ domain, "provider.json"])
api_version = provider_config.get_api_version()
if SupportedAPIs.supports(api_version):