From be66ed7614b57f6c552bddd0b3d27175f37de3cf Mon Sep 17 00:00:00 2001 From: hyokeun Date: Fri, 21 Jul 2017 09:34:25 +0900 Subject: [PATCH] Fix attribute error in SMTPDataError Change-Id: Ia2395b6f224f5597ee857bc629ec87ce845c022d --- common/send_mail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/send_mail.py b/common/send_mail.py index 50b1e2f..3c3c4fc 100644 --- a/common/send_mail.py +++ b/common/send_mail.py @@ -69,7 +69,7 @@ def sendmail(from_email, to_who, msg, smtp_server): smtp.quit() print "Email to %s sent succeeded" % to_who except smtplib.SMTPException, smtpe: - if 'no valid recipients' in smtpe.recipients.values()[0][1]: + if 'no valid recipients' in smtpe: raise MailError('Error: unable to send email: %s' % smtpe) raise Exception, "Error: unable to send email: %s" % smtpe -- 2.7.4