[Zope-Checkins]
SVN: Zope/branches/2.9/lib/python/Zope2/App/startup.py
Fix for the cases where test.py is run without a configuration file.
Florent Guillaume
fg at nuxeo.com
Mon Jan 16 06:27:59 EST 2006
Log message for revision 41321:
Fix for the cases where test.py is run without a configuration file.
Changed:
U Zope/branches/2.9/lib/python/Zope2/App/startup.py
-=-
Modified: Zope/branches/2.9/lib/python/Zope2/App/startup.py
===================================================================
--- Zope/branches/2.9/lib/python/Zope2/App/startup.py 2006-01-15 14:01:42 UTC (rev 41320)
+++ Zope/branches/2.9/lib/python/Zope2/App/startup.py 2006-01-16 11:27:57 UTC (rev 41321)
@@ -62,12 +62,15 @@
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()
More information about the Zope-Checkins
mailing list