Commit 68b3ae5a authored by Florent Guillaume's avatar Florent Guillaume

Fix for the cases where test.py is run without a configuration file.

parent 14dad585
......@@ -62,12 +62,15 @@ def startup():
m=imp.load_module('Zope2.custom_zodb', m[0], m[1], m[2])
sys.modules['Zope2.custom_zodb']=m
# Get the database and join it to the dbtab multidatabase
# FIXME: this uses internal datastructures of dbtab
databases = getattr(dbtab, 'databases', {})
if hasattr(m,'DB'):
DB=m.DB
dbtab.databases.update(getattr(DB, 'databases', {}))
DB.databases = dbtab.databases
databases.update(getattr(DB, 'databases', {}))
DB.databases = databases
else:
DB = ZODB.DB(m.Storage, databases=dbtab.databases)
DB = ZODB.DB(m.Storage, databases=databases)
Globals.BobobaseName = DB.getName()
......
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