diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2016-03-04 01:29:26 -0400 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2016-03-04 01:29:26 -0400 |
commit | 2ae13655a680ef85f03fca171c405d846b5d84fb (patch) | |
tree | fa4c63ce67e0407fb5f64c6243d1d6684f2ab8d7 /src/leap/bonafide | |
parent | ac3d673855678e49ca4c980d01675448db2f3f03 (diff) |
reorder class for readability
Diffstat (limited to 'src/leap/bonafide')
-rw-r--r-- | src/leap/bonafide/config.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/leap/bonafide/config.py b/src/leap/bonafide/config.py index f866368..5aba663 100644 --- a/src/leap/bonafide/config.py +++ b/src/leap/bonafide/config.py @@ -124,11 +124,6 @@ def get_username_and_provider(full_id): return full_id.split('@') -class WebClientContextFactory(ClientContextFactory): - def getContext(self, hostname, port): - return ClientContextFactory.getContext(self) - - class Provider(object): # TODO add validation @@ -313,7 +308,8 @@ class Provider(object): # FIXME --- configs.json raises 500, see #7914. # This is a workaround until that's fixed. log.err(failure) - log.msg("COULD NOT VERIFY CONFIGS.JSON, WORKAROUND: DIRECT DOWNLOAD") + log.msg( + "COULD NOT VERIFY CONFIGS.JSON, WORKAROUND: DIRECT DOWNLOAD") if 'mx' in self._provider_config.services: soledad_uri = '/1/config/soledad-service.json' @@ -323,8 +319,10 @@ class Provider(object): fetch = self._fetch_provider_configs_unauthenticated get_path = self._get_service_config_path - d1 = fetch('https://' + str(base + soledad_uri), get_path('soledad')) - d2 = fetch('https://' + str(base + smtp_uri), get_path('smtp')) + d1 = fetch( + 'https://' + str(base + soledad_uri), get_path('soledad')) + d2 = fetch( + 'https://' + str(base + smtp_uri), get_path('smtp')) d = defer.gatherResults([d1, d2]) d.addCallback(lambda _: finish_stuck_after_workaround()) return d @@ -479,6 +477,11 @@ class Record(object): self.__dict__.update(kw) +class WebClientContextFactory(ClientContextFactory): + def getContext(self, hostname, port): + return ClientContextFactory.getContext(self) + + if __name__ == '__main__': def print_done(): |