[Zope3-checkins] CVS: Zope3/lib/python/Zope/StartUp - SiteDefinition.py:1.9
Jeremy Hylton
jeremy@zope.com
Tue, 8 Oct 2002 17:09:40 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/StartUp
In directory cvs.zope.org:/tmp/cvs-serv11077/lib/python/Zope/StartUp
Modified Files:
SiteDefinition.py
Log Message:
Install the PersistentModuleImporter() when ZODB is initialized.
XXX I don't know where the install should be done.
=== Zope3/lib/python/Zope/StartUp/SiteDefinition.py 1.8 => 1.9 ===
--- Zope3/lib/python/Zope/StartUp/SiteDefinition.py:1.8 Tue Oct 8 16:42:25 2002
+++ Zope3/lib/python/Zope/StartUp/SiteDefinition.py Tue Oct 8 17:09:40 2002
@@ -34,6 +34,8 @@
from Zope.Server.TaskThreads import ThreadedTaskDispatcher
from Zope.App.ZopePublication.ZopePublication import ZopePublication
+from Persistence.Module import PersistentModuleImporter
+
import asyncore, zLOG
DEFAULT_STORAGE_FILE = 'Data.fs'
@@ -136,7 +138,7 @@
server_info['verbose'])
def _initDB(self):
- """Initialize the ZODB"""
+ """Initialize the ZODB and persistence module importer."""
connection = self._zodb.open()
root = connection.root()
@@ -153,6 +155,9 @@
get_transaction().commit()
connection.close()
+
+ imp = PersistentModuleImporter()
+ imp.install()
def __call__(self):