signal email sending success

This commit is contained in:
nathaniel smith 2017-01-21 00:34:17 -08:00
parent cecc9deeb4
commit 1a111be0d5

View File

@ -21,8 +21,12 @@ def send_email(to, body, subject='a message from tilde.town', frum=FROM,):
} }
) )
if response.status_code != 200: success = response.status_code == 200
if not success:
logger.error('{}: failed to send email "{}" to {}'.format( logger.error('{}: failed to send email "{}" to {}'.format(
response.status_code, response.status_code,
subject, subject,
to)) to))
return success