From d7a9ea8845461e765052733f62e77cd71a1cde82 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Mon, 2 Dec 2013 12:01:18 -0300 Subject: Encode paths out. --- src/leap/bitmask/provider/providerbootstrapper.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/leap/bitmask/provider') 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): -- cgit v1.2.3