Improving root message formatter

This commit is contained in:
Sergio Durigan Junior 2016-07-23 11:05:04 -04:00
parent 05c9e2ba0e
commit 6f4c6d5dbc

View file

@ -158,18 +158,32 @@ def SendRootMessageGDBTesters (branch, change, istrysched = False,
# WE HAVE TO REMEMBER TO CLEAN THESE FILES REGULARLY # WE HAVE TO REMEMBER TO CLEAN THESE FILES REGULARLY
open (f, 'w').close () open (f, 'w').close ()
text = "" if not istrysched:
text += "*** TEST RESULTS FOR COMMIT %s ***\n\n" % rev text = ""
text += "*** TEST RESULTS FOR COMMIT %s ***\n\n" % rev
text += "Author: %s\n" % change.who text += "Author: %s\n" % change.who
text += "Branch: %s\n" % branch text += "Branch: %s\n" % branch
text += "Commit: %s\n\n" % rev text += "Commit: %s\n\n" % rev
text += change.comments.split ('\n')[0] + "\n\n" text += change.comments.split ('\n')[0] + "\n\n"
text += '\n'.join (change.comments.split ('\n')[1:]) text += '\n'.join (change.comments.split ('\n')[1:])
chg_title = change.comments.split ('\n')[0]
text = text.encode ('ascii', 'ignore').decode ('ascii')
else:
text = ""
text += "*** TEST RESULTS FOR TRY BUILD ***\n\n"
text += "Branch: %s\n" % branch
text += "Commit tested against: %s\n\n" % rev
text += "Patch tested:\n\n"
text += change.patch_body
chg_title = "Try Build against commit %s" % rev
text = text.encode ('ascii', 'ignore').decode ('ascii')
chg_title = change.comments.split ('\n')[0]
text = text.encode ('ascii', 'ignore').decode ('ascii')
mail = MIMEText (text) mail = MIMEText (text)
if branch == 'master': if branch == 'master':
sbj = "[binutils-gdb] %s" % chg_title sbj = "[binutils-gdb] %s" % chg_title