Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c8b1013

Browse files
committed
minor fix - issue #311
1 parent 13b776f commit c8b1013

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

extra/shutils/regressiontest.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import time
1313

1414
from email.mime.text import MIMEText
15+
from email.mime.multipart import MIMEMultipart
1516

1617
TIME = time.strftime("%H:%M:%S %d-%m-%Y", time.gmtime())
1718

@@ -38,7 +39,7 @@
3839
parse = failed_test[3] if failed_test[3] else None
3940
output_folder = failed_test[4]
4041
traceback = False if failed_test[5] == "False" else bool(failed_test[5])
41-
detection = True if failed_test[6] else False
42+
detection = False if failed_test[6] == "False" else bool(failed_test[5])
4243

4344
TEST_COUNTS.append(test_count)
4445

@@ -74,11 +75,13 @@
7475

7576
if CONTENT:
7677
SUBJECT += " (%s)" % ", ".join("#%d" % count for count in TEST_COUNTS)
77-
msg = MIMEText(CONTENT)
78+
msg = MIMEMultipart()
7879
msg["Subject"] = SUBJECT
7980
msg["From"] = FROM
8081
msg["To"] = TO
8182

83+
msg.attach(MIMEText(CONTENT))
84+
8285
for test_count, attachment in ATTACHMENTS.items():
8386
attachment = MIMEText(attachment)
8487
attachment.add_header('Content-Disposition', 'attachment', filename="test_case_%d_console_output.txt" % test_count)

0 commit comments

Comments
 (0)