From c8b1013c42e3350ff5d9fc68e49cb0fbca77f498 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Fri, 18 Jan 2013 13:20:19 +0000 Subject: [PATCH] minor fix - issue #311 --- extra/shutils/regressiontest.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/extra/shutils/regressiontest.py b/extra/shutils/regressiontest.py index f7bb3deb6..897b1f487 100644 --- a/extra/shutils/regressiontest.py +++ b/extra/shutils/regressiontest.py @@ -12,6 +12,7 @@ import subprocess import time from email.mime.text import MIMEText +from email.mime.multipart import MIMEMultipart TIME = time.strftime("%H:%M:%S %d-%m-%Y", time.gmtime()) @@ -38,7 +39,7 @@ for failed_test in failed_tests: parse = failed_test[3] if failed_test[3] else None output_folder = failed_test[4] traceback = False if failed_test[5] == "False" else bool(failed_test[5]) - detection = True if failed_test[6] else False + detection = False if failed_test[6] == "False" else bool(failed_test[5]) TEST_COUNTS.append(test_count) @@ -74,11 +75,13 @@ for failed_test in failed_tests: if CONTENT: SUBJECT += " (%s)" % ", ".join("#%d" % count for count in TEST_COUNTS) - msg = MIMEText(CONTENT) + msg = MIMEMultipart() msg["Subject"] = SUBJECT msg["From"] = FROM msg["To"] = TO + msg.attach(MIMEText(CONTENT)) + for test_count, attachment in ATTACHMENTS.items(): attachment = MIMEText(attachment) attachment.add_header('Content-Disposition', 'attachment', filename="test_case_%d_console_output.txt" % test_count)