Python 2.7.9 didn't get the context=ssl... backport unfortunately

This commit is contained in:
Martin Zimmermann 2015-02-24 20:56:20 +01:00
parent e3dedef7ed
commit aa64b27684

View File

@ -64,7 +64,7 @@ class SMTP(object):
timeout=self.conf.getint('timeout'))
if self.conf.get('security') == 'starttls':
if sys.version_info >= (3, 4) or (2, 7, 9) <= sys.version_info <= (3, 0):
if sys.version_info >= (3, 4):
import ssl
self.client.starttls(context=ssl.create_default_context())
else: