summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2018-03-23 11:24:16 +1300
committerDouglas Bagnall <dbagnall@samba.org>2018-05-05 04:32:42 +0200
commitcb40e2bbc8a34a1ec3584ab585c5bf44c037ef0e (patch)
treea6d16f911f7fdcc09819b42f121e0b8631c337ae /script
parent406284be95d38d9fbdfb970fbe6cb17f25c63bf6 (diff)
downloadsamba-cb40e2bbc8a34a1ec3584ab585c5bf44c037ef0e.tar.gz
autobuild: do not try to send email to no recipient
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'script')
-rwxr-xr-xscript/autobuild.py5
1 files changed, 5 insertions, 0 deletions
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