[Zope-Checkins] SVN: Zope/trunk/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:30:07 EST 2006
Log message for revision 41322:
Fix for the cases where test.py is run without a configuration file.
Changed:
U Zope/trunk/lib/python/Zope2/App/startup.py
-=-
Modified: Zope/trunk/lib/python/Zope2/App/startup.py
===================================================================
--- Zope/trunk/lib/python/Zope2/App/startup.py 2006-01-16 11:27:57 UTC (rev 41321)
+++ Zope/trunk/lib/python/Zope2/App/startup.py 2006-01-16 11:30:06 UTC (rev 41322)
@@ -61,12 +61,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