Commit c8aca9fe authored by Julien Muchembled's avatar Julien Muchembled

On Zope 2.8, ObjectManager._setObject doesn't know 'suppress_events'

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43508 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d0485400
......@@ -411,14 +411,16 @@ def _maybe_bootstrap(portal):
tool_id = tool_class.id
tool = getattr(portal, tool_id, None)
if tool is None:
portal._setObject(tool_id, tool_class(),
set_owner=False, suppress_events=True)
tool = tool_class()
try:
portal._setObject(tool_id, tool, set_owner=False, suppress_events=True)
except TypeError:
portal._setObject(tool_id, tool, set_owner=False)
tool = getattr(portal, tool_id)
elif not tool._isBootstrapRequired():
continue
if not bootstrap:
migrate = True
LOG('ERP5Site', INFO, 'bootstrap %s...' % tool_id)
from Products.ERP5.ERP5Site import getBootstrapDirectory
bootstrap = getBootstrapDirectory()
......
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