#16: fix for None values
This commit is contained in:
parent
2a88d5ab7a
commit
46de442890
1 changed files with 1 additions and 1 deletions
|
@ -313,7 +313,7 @@ def send_email(to, subject='diffido', body='', from_=None):
|
||||||
tls_args = {}
|
tls_args = {}
|
||||||
for key in ('ssl_keyfile', 'ssl_certfile', 'ssl_context'):
|
for key in ('ssl_keyfile', 'ssl_certfile', 'ssl_context'):
|
||||||
if key in args:
|
if key in args:
|
||||||
tls_args[key] = args[key].replace('ssl_', '')
|
tls_args[key] = (args[key] or '').replace('ssl_', '')
|
||||||
del args[key]
|
del args[key]
|
||||||
with smtplib.SMTP(**args) as s:
|
with smtplib.SMTP(**args) as s:
|
||||||
if starttls:
|
if starttls:
|
||||||
|
|
Loading…
Reference in a new issue