[Erp5-report] r36241 nicolas - /erp5/trunk/products/ERP5OOo/Document/OOoDocument.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jun 10 18:01:21 CEST 2010
Author: nicolas
Date: Thu Jun 10 18:01:15 2010
New Revision: 36241
URL: http://svn.erp5.org?rev=36241&view=rev
Log:
Move in Try Except block the call of _convert.
All kind of exceptions raised explicitely by _convert are
catched, then in case of failure fallback to PermanentURLMixIn.
Modified:
erp5/trunk/products/ERP5OOo/Document/OOoDocument.py
Modified: erp5/trunk/products/ERP5OOo/Document/OOoDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/Document/OOoDocument.py?rev=36241&r1=36240&r2=36241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/Document/OOoDocument.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/Document/OOoDocument.py [utf8] Thu Jun 10 18:01:15 2010
@@ -470,14 +470,14 @@ class OOoDocument(PermanentURLMixIn, Bas
def _getExtensibleContent(self, request, name):
# Be sure that html conversion is done,
# as it is required to extract extensible content
- self._convert(format='html')
- web_cache_kw = {'name': name,
- 'format': '_embedded'}
- _setCacheHeaders(_ViewEmulator().__of__(self), web_cache_kw)
try:
+ self._convert(format='html')
+ web_cache_kw = {'name': name,
+ 'format': '_embedded'}
+ _setCacheHeaders(_ViewEmulator().__of__(self), web_cache_kw)
mime, data = self.getConversion(format='_embedded', file_name=name)
return OFSFile(name, name, data, content_type=mime).__of__(self.aq_parent)
- except KeyError:
+ except (NotConvertedError, ConversionError, KeyError):
return PermanentURLMixIn._getExtensibleContent(self, request, name)
security.declarePrivate('_convertToBaseFormat')
More information about the Erp5-report
mailing list