[Erp5-report] r9211 - /erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Aug 14 22:35:17 CEST 2006
Author: bartek
Date: Mon Aug 14 22:35:15 2006
New Revision: 9211
URL: http://svn.erp5.org?rev=9211&view=rev
Log:
handle value returned by object
Modified:
erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_createObjectFromMail.xml
Modified: erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_createObjectFromMail.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_createObjectFromMail.xml?rev=9211&r1=9210&r2=9211&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_createObjectFromMail.xml (original)
+++ erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_createObjectFromMail.xml Mon Aug 14 22:35:15 2006
@@ -68,7 +68,9 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string># determine content type\n
+ <value> <string encoding="cdata"><![CDATA[
+
+# determine content type\n
ctype=context.content_type_registry.findTypeName(fname,None,None)\n
context.log(fname,ctype)\n
if ctype is None:\n
@@ -78,9 +80,13 @@
ob=context.document_module.newContent(portal_type=ctype,file=data)\n
ob.setOriginalFilename(fname)\n
ob.guessMimeType(fname)\n
-ob.convert() # to be changed - OOoDocument needs refactoring\n
+code,msg=ob.convert()\n
+if code>0:\n
+ raise Exception(msg)\n
return ob\n
-</string> </value>
+
+
+]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
@@ -125,11 +131,14 @@
<string>fname</string>
<string>data</string>
<string>_getattr_</string>
-<string>context</string>
+ <string>context</string>
<string>None</string>
<string>ctype</string>
<string>Exception</string>
<string>ob</string>
+ <string>_getiter_</string>
+ <string>code</string>
+ <string>msg</string>
</tuple>
</value>
</item>
More information about the Erp5-report
mailing list