[Erp5-report] r21152 - /erp5/trunk/products/ERP5/Document/TextDocument.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon May 26 23:17:47 CEST 2008
Author: nicolas
Date: Mon May 26 23:17:47 2008
New Revision: 21152
URL: http://svn.erp5.org?rev=21152&view=rev
Log:
Replace convertTo by convertToData which return always str objects.
Add new parameter usefull for oood chains
Enhance log message
Modified:
erp5/trunk/products/ERP5/Document/TextDocument.py
Modified: erp5/trunk/products/ERP5/Document/TextDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TextDocument.py?rev=21152&r1=21151&r2=21152&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TextDocument.py (original)
+++ erp5/trunk/products/ERP5/Document/TextDocument.py Mon May 26 23:17:47 2008
@@ -163,14 +163,14 @@
text_content = self.getTextContent()
if text_content is not None:
portal_transforms = getToolByName(self, 'portal_transforms')
- result = portal_transforms.convertTo(mime_type,
- text_content,
- object=self,
- mimetype=src_mimetype)
+ result = portal_transforms.convertToData(mime_type, text_content,
+ object=self, context=self,
+ filename=self.title_or_id(),
+ mimetype=src_mimetype)
if result is None:
# portal_transforms fails to convert.
LOG('TextDocument.convert', WARNING,
- 'portal_transforms failed to convert to text: %r' % self)
+ 'portal_transforms failed to convert to %s: %r' % (mime_type, self))
result = ''
return mime_type, result
else:
More information about the Erp5-report
mailing list