From: hyokeun Date: Fri, 21 Jul 2017 00:34:25 +0000 (+0900) Subject: Fix attribute error in SMTPDataError X-Git-Tag: submit/trunk/20190927.012743~370^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be66ed7614b57f6c552bddd0b3d27175f37de3cf;p=services%2Fjenkins-scripts.git Fix attribute error in SMTPDataError Change-Id: Ia2395b6f224f5597ee857bc629ec87ce845c022d --- 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