summaryrefslogtreecommitdiff
path: root/bonafide/src
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-03-04 01:29:26 -0400
committerKali Kaneko (leap communications) <kali@leap.se>2016-03-04 01:29:26 -0400
commit38a5c3c73832110922b3628e791070d2034c625c (patch)
tree815ea20336c72810c06e939699ca5c9420519c4b /bonafide/src
parent05a15eb66ce7912094361e78e81d073e88cae21b (diff)
reorder class for readability
Diffstat (limited to 'bonafide/src')
-rw-r--r--bonafide/src/leap/bonafide/config.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/bonafide/src/leap/bonafide/config.py b/bonafide/src/leap/bonafide/config.py
index f866368..5aba663 100644
--- a/bonafide/src/leap/bonafide/config.py
+++ b/bonafide/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():