Commit 4011e4e9 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

exception should not be raised in converting to HTML inside getContentInformation().


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42009 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8bb498b8
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo, getSecurityManager from AccessControl import ClassSecurityInfo, getSecurityManager
from ZODB.POSException import ConflictError
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type.Utils import convertToUpperCase from Products.ERP5Type.Utils import convertToUpperCase
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
...@@ -45,6 +46,8 @@ VALID_ORDER_KEY_LIST = ('user_login', 'content', 'filename', 'file_name', ...@@ -45,6 +46,8 @@ VALID_ORDER_KEY_LIST = ('user_login', 'content', 'filename', 'file_name',
CONTENT_INFORMATION_FORMAT = '_idiscoverable_content_information' CONTENT_INFORMATION_FORMAT = '_idiscoverable_content_information'
class ConversionError(Exception):pass
class DiscoverableMixin(CachedConvertableMixin): class DiscoverableMixin(CachedConvertableMixin):
""" """
Implements IDiscoverable Implements IDiscoverable
...@@ -261,7 +264,12 @@ class DiscoverableMixin(CachedConvertableMixin): ...@@ -261,7 +264,12 @@ class DiscoverableMixin(CachedConvertableMixin):
the document title. the document title.
""" """
result = {} result = {}
try:
html = self.asEntireHTML() html = self.asEntireHTML()
except ConflictError:
raise
except:
return result
if not html: if not html:
return result return result
title_list = re.findall(self.title_parser, str(html)) title_list = re.findall(self.title_parser, str(html))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment