Commit ffd50b54 authored by Chris McDonough's avatar Chris McDonough

Revert change that was mistakenly merged from chrism-install-branch into the

trunk.
parent 66604b16
......@@ -31,38 +31,25 @@ import AccessControl.User
import ZPublisher
import ExtensionClass
from zLOG import LOG, WARNING, INFO, BLATHER, log_time
from Zope import Startup
def startup():
config = Startup.getConfiguration()
def startup():
global ZODB, app
Globals.BobobaseName = os.path.join(Globals.data_dir, 'Data.fs')
Globals.DatabaseVersion='3'
# Import products
OFS.Application.import_products()
# Set up a root database from zconfig data
zconfig_db = None
set_root = 0
for mount_points, dbfactory in config.databases:
# only use root for now
if '/' in mount_points:
if set_root:
raise ConfigurationError, (
"Cannot specify more than one 'root' / database"
)
zconfig_db = dbfactory()
Globals.BobobaseName = zconfig_db.getName()
set_root = 1
# Open the database
try:
# Root db/storage in custom_zodb overrides zconfig_db
# Try to use custom storage
m=imp.find_module('custom_zodb',[INSTANCE_HOME])
except:
DB = zconfig_db
import ZODB.FileStorage
storage = ZODB.FileStorage.FileStorage(Globals.BobobaseName)
DB = ZODB.DB(storage)
else:
m=imp.load_module('Zope.custom_zodb', m[0], m[1], m[2])
if hasattr(m,'DB'):
......@@ -74,9 +61,6 @@ def startup():
Globals.BobobaseName = DB.getName()
sys.modules['Zope.custom_zodb']=m
if DB is None:
raise Startup.ConfigurationError, "Must specify a root ('/') database"
if DB.getActivityMonitor() is None:
from ZODB.ActivityMonitor import ActivityMonitor
DB.setActivityMonitor(ActivityMonitor())
......
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