Fixing breakage email To: list

This commit is contained in:
Sergio Durigan Junior 2017-09-21 16:13:35 -04:00
parent 4580e75c97
commit e4d72f98f7

View file

@ -242,6 +242,7 @@ subsequent commits are made after X, by different people."""
rev = change.revision rev = change.revision
to = change.who.encode ('ascii', 'ignore').decode ('ascii') to = change.who.encode ('ascii', 'ignore').decode ('ascii')
to_list = [ to ]
title = change.comments.split ('\n')[0] title = change.comments.split ('\n')[0]
sbj = 'Oh dear. I regret to inform you that commit %s might be unfortunate' % change.revision sbj = 'Oh dear. I regret to inform you that commit %s might be unfortunate' % change.revision
@ -266,11 +267,12 @@ subsequent commits are made after X, by different people."""
mail['Subject'] = sbj mail['Subject'] = sbj
mail['From'] = 'gdb-buildbot@sergiodj.net' mail['From'] = 'gdb-buildbot@sergiodj.net'
to += ", gdb-patches@sourceware.org" to += ", gdb-patches@sourceware.org"
to_list.append ('gdb-patches@sourceware.org')
mail['To'] = to mail['To'] = to
mail['Reply-To'] = 'gdb-patches@sourceware.org' mail['Reply-To'] = 'gdb-patches@sourceware.org'
s = smtplib.SMTP ('localhost') s = smtplib.SMTP ('localhost')
s.sendmail (GDB_MAIL_FROM, [ to ], mail.as_string ()) s.sendmail (GDB_MAIL_FROM, to_list, mail.as_string ())
s.quit () s.quit ()
def MessageGDBTesters (mode, name, build, results, master_status): def MessageGDBTesters (mode, name, build, results, master_status):