Commit f344f5b2 authored by Nicolas Delaby's avatar Nicolas Delaby Committed by Arnaud Fontaine

- Put result summary in beginning of subject emails for fast reading.

- return subject in output stream


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils/erp5.utils.web_checker/@37710 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 88d44296
......@@ -395,10 +395,9 @@ class HTTPCacheCheckerTestSuite(object):
else:
report_message = 'No errors'
signal = 'OK'
subject = '%r:HTTP Cache checker results for %s' % (signal, self.root_url)
if self.email_address:
import smtplib
subject = 'HTTP Cache checker results for %s: %s' % (self.root_url,
signal)
message = 'Subject: %s\nFrom: %s\nTo: %s\n\n%s' %\
(subject, self.email_address, self.email_address, report_message)
server = smtplib.SMTP(self.smtp_host)
......@@ -406,7 +405,7 @@ class HTTPCacheCheckerTestSuite(object):
server.quit()
return 'Email sended to %s' % self.email_address
else:
return report_message
return subject + '\n' + report_message
from optparse import OptionParser
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment