From cb40e2bbc8a34a1ec3584ab585c5bf44c037ef0e Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Fri, 23 Mar 2018 11:24:16 +1300 Subject: [PATCH] autobuild: do not try to send email to no recipient Signed-off-by: Douglas Bagnall Reviewed-by: Gary Lockyer --- script/autobuild.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/script/autobuild.py b/script/autobuild.py index 5a7b7bc32c8..65b89d1b40a 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -692,6 +692,11 @@ parser.add_option("", "--restrict-tests", help="run as make test with this TESTS default='') def send_email(subject, text, log_tar): + if options.email is None: + do_print("not sending email because the recipient is not set") + do_print("the text content would have been:\n\nSubject: %s\n\nTs" % + (subject, text)) + return outer = MIMEMultipart() outer['Subject'] = subject outer['To'] = options.email -- 2.11.4.GIT