[Erp5-report] r23764 - /erp5/trunk/products/ERP5OOo/OOoTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Sep 23 16:28:12 CEST 2008
Author: jerome
Date: Tue Sep 23 16:28:08 2008
New Revision: 23764
URL: http://svn.erp5.org?rev=23764&view=rev
Log:
Change the way to test if the style is dynamic in something better. The
current way was hiding AttributeError that may be raised while rendering this
style.
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=23764&r1=23763&r2=23764&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/OOoTemplate.py (original)
+++ erp5/trunk/products/ERP5OOo/OOoTemplate.py Tue Sep 23 16:28:08 2008
@@ -456,11 +456,9 @@
format = request.get('format')
try:
# If style is dynamic, call it
- try:
+ if getattr(aq_base(ooo_document), '__call__', None) is not None:
request.set('format', None)
ooo_document = ooo_document()
- except AttributeError:
- pass
finally:
request.set('format', format)
# Create a new builder instance
More information about the Erp5-report
mailing list