[Erp5-report] r15181 - /erp5/trunk/products/ERP5OOo/OOoTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jul 10 23:13:37 CEST 2007
Author: yo
Date: Tue Jul 10 23:13:36 2007
New Revision: 15181
URL: http://svn.erp5.org?rev=15181&view=rev
Log:
Explicitly convert data to a string when getting picture data, because the data may be Pdata, and it is not compatible with zipfile.
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=15181&r1=15180&r2=15181&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/OOoTemplate.py (original)
+++ erp5/trunk/products/ERP5OOo/OOoTemplate.py Tue Jul 10 23:13:36 2007
@@ -319,11 +319,12 @@
# manipulations are different
is_standard_filetype = True
- if not hasattr(picture,'data') or callable(picture.content_type):
+ if getattr(picture, 'data', None) is not None \
+ or callable(picture.content_type):
is_standard_filetype = False
if is_standard_filetype:
- picture_data = picture.data
+ picture_data = str(picture.getData())
else:
picture_data = picture.Base_download()
More information about the Erp5-report
mailing list