Commit 7382b7da authored by Jérome Perrin's avatar Jérome Perrin

fixup! py2/py3: Make Products code compatible with both python2 and python3.

parent 858ff048
......@@ -40,6 +40,7 @@ from Products.CMFActivity.ActivityRuntimeEnvironment import getActivityRuntimeEn
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from Products.ERP5Type.Utils import str2bytes
from Products.ERP5.mixin.periodicity import PeriodicityMixin
class Alarm(XMLObject, PeriodicityMixin):
......@@ -358,7 +359,7 @@ class Alarm(XMLObject, PeriodicityMixin):
for x in result_list]
rendered_alarm_result = '\n'.join(rendered_alarm_result_list)
attachment_list.append({'name': 'alarm_result.txt',
'content': rendered_alarm_result.encode(),
'content': str2bytes(rendered_alarm_result),
'mime_type': 'text/plain'})
notification_tool.sendMessage(recipient=candidate_list,
......
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