summaryrefslogtreecommitdiff
path: root/src/leap/services/mail/smtpbootstrapper.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-08-09 18:18:00 +0200
committerKali Kaneko <kali@leap.se>2013-08-09 18:18:00 +0200
commite3758f91f58d3a17032860bb17e1643c331c3b0f (patch)
tree7fb9d8e5a675a093443a4224b0fd70c26d437b0c /src/leap/services/mail/smtpbootstrapper.py
parent275109e17f53c2fceb21d6f87626762800f53e22 (diff)
parentb942468aac94be2bf4bb9bc1849391e72c366697 (diff)
Merge remote-tracking branch 'chiiph/feature/relnotes' into develop
Diffstat (limited to 'src/leap/services/mail/smtpbootstrapper.py')
-rw-r--r--src/leap/services/mail/smtpbootstrapper.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/leap/services/mail/smtpbootstrapper.py b/src/leap/services/mail/smtpbootstrapper.py
index e8af5349..48040035 100644
--- a/src/leap/services/mail/smtpbootstrapper.py
+++ b/src/leap/services/mail/smtpbootstrapper.py
@@ -72,10 +72,12 @@ class SMTPBootstrapper(AbstractBootstrapper):
if self._download_if_needed and mtime:
headers['if-modified-since'] = mtime
+ api_version = self._provider_config.get_api_version()
+
# there is some confusion with this uri,
config_uri = "%s/%s/config/smtp-service.json" % (
- self._provider_config.get_api_uri(),
- self._provider_config.get_api_version())
+ self._provider_config.get_api_uri(), api_version)
+
logger.debug('Downloading SMTP config from: %s' % config_uri)
srp_auth = SRPAuth(self._provider_config)
@@ -91,6 +93,8 @@ class SMTPBootstrapper(AbstractBootstrapper):
cookies=cookies)
res.raise_for_status()
+ self._smtp_config.set_api_version(api_version)
+
# Not modified
if res.status_code == 304:
logger.debug("SMTP definition has not been modified")