[Zope-Checkins] CVS: Zope/lib/python/Zope/App - startup.py:1.5

Fred L. Drake, Jr. fred@zope.com
Tue, 11 Feb 2003 12:17:11 -0500


Update of /cvs-repository/Zope/lib/python/Zope/App
In directory cvs.zope.org:/tmp/cvs-serv22003/lib/python/Zope/App

Modified Files:
	startup.py 
Log Message:
Add the App.config module and use the API it exports to get configuration
values.


=== Zope/lib/python/Zope/App/startup.py 1.4 => 1.5 ===
--- Zope/lib/python/Zope/App/startup.py:1.4	Mon Jan  6 12:56:54 2003
+++ Zope/lib/python/Zope/App/startup.py	Tue Feb 11 12:17:09 2003
@@ -20,7 +20,7 @@
 
 import Zope
 from Acquisition import aq_acquire
-import App.FindHomes
+from App.config import getConfiguration
 import ZODB
 import ZODB.ZApplication
 from ZODB.POSException import ConflictError
@@ -36,7 +36,8 @@
 def startup():
     global ZODB, app
 
-    Globals.BobobaseName = os.path.join(Globals.data_dir, 'Data.fs')
+    Globals.BobobaseName = os.path.join(getConfiguration().clienthome,
+                                        'Data.fs')
     Globals.DatabaseVersion='3'
 
     # Import products
@@ -45,7 +46,7 @@
     # Open the database
     try:
         # Try to use custom storage
-        m=imp.find_module('custom_zodb',[INSTANCE_HOME])
+        m=imp.find_module('custom_zodb',[getConfiguration().instancehome])
     except:
         import ZODB.FileStorage
         storage = ZODB.FileStorage.FileStorage(Globals.BobobaseName)