[Erp5-report] r15386 - /erp5/trunk/products/ERP5OOo/OOoTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jul 30 18:12:48 CEST 2007


Author: kazuhiko
Date: Mon Jul 30 18:12:48 2007
New Revision: 15386

URL: http://svn.erp5.org?rev=15386&view=rev
Log:
convert to str to avoid an error in zipfile.py.

Modified:
    erp5/trunk/products/ERP5OOo/OOoTemplate.py

Modified: erp5/trunk/products/ERP5OOo/OOoTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/OOoTemplate.py?rev=15386&r1=15385&r2=15386&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/OOoTemplate.py (original)
+++ erp5/trunk/products/ERP5OOo/OOoTemplate.py Mon Jul 30 18:12:48 2007
@@ -418,6 +418,8 @@
     
     # And render page template
     doc_xml = ZopePageTemplate.pt_render(self, source=source, extra_context=extra_context)
+    if isinstance(doc_xml, unicode):
+      doc_xml = doc_xml.encode('utf-8')
 
     # Replace the includes
     (doc_xml,attachments_dict) = self.renderIncludes(here, doc_xml)




More information about the Erp5-report mailing list