Commit 54a199c3 authored by Alexandre Boeglin's avatar Alexandre Boeglin

changing of zope instance made easier


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9966 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6a98ed66
...@@ -10,8 +10,9 @@ from email.MIMEImage import MIMEImage ...@@ -10,8 +10,9 @@ from email.MIMEImage import MIMEImage
from email.MIMEMultipart import MIMEMultipart from email.MIMEMultipart import MIMEMultipart
COMMASPACE = ', ' COMMASPACE = ', '
USER = 'seb' USER = 'seb'
ZOPE_INSTANCE = '/home/%s/zope' % USER
subject = 'ERP5 Unit Test' subject = 'ERP5 Unit Test'
from_mail = 'seb@nexedi.com' from_mail = 'seb@nexedi.com'
...@@ -21,7 +22,7 @@ to_mail = [ 'erp5-report@nexedi.com' ...@@ -21,7 +22,7 @@ to_mail = [ 'erp5-report@nexedi.com'
] ]
test_msg = file("/home/%s/zope/Products/test_output" % (USER),'r').read() test_msg = file("%s/Products/test_output" % (ZOPE_INSTANCE),'r').read()
test_msg = "Date : %s\n\n" % date.today().isoformat() + test_msg test_msg = "Date : %s\n\n" % date.today().isoformat() + test_msg
#msg.set_payload(test_msg) #msg.set_payload(test_msg)
msg = MIMEMultipart() msg = MIMEMultipart()
...@@ -33,7 +34,7 @@ msg['To'] = COMMASPACE.join(to_mail) ...@@ -33,7 +34,7 @@ msg['To'] = COMMASPACE.join(to_mail)
# Guarantees the message ends in a newline # Guarantees the message ends in a newline
msg.preamble = subject msg.preamble = subject
msg.epilogue = '' msg.epilogue = ''
file_content = file("/home/%s/zope/Products/test_full_output" % (USER),'r').read() file_content = file("%s/Products/test_full_output" % (ZOPE_INSTANCE),'r').read()
mime_text = MIMEText(test_msg) mime_text = MIMEText(test_msg)
mime_text.add_header('Content-Disposition', 'attachment', filename='test_output') mime_text.add_header('Content-Disposition', 'attachment', filename='test_output')
msg.attach(mime_text) msg.attach(mime_text)
......
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