From 2ae13655a680ef85f03fca171c405d846b5d84fb Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Fri, 4 Mar 2016 01:29:26 -0400 Subject: reorder class for readability --- src/leap/bonafide/config.py | 19 +++++++++++-------- 1 file 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(): -- cgit v1.2.3