[Zope-Checkins] CVS: Zope/lib/python - Globals.py:1.54
Fred L. Drake, Jr.
fred@zope.com
Tue, 11 Feb 2003 12:17:33 -0500
Update of /cvs-repository/Zope/lib/python
In directory cvs.zope.org:/tmp/cvs-serv22003/lib/python
Modified Files:
Globals.py
Log Message:
Add the App.config module and use the API it exports to get configuration
values.
=== Zope/lib/python/Globals.py 1.53 => 1.54 ===
--- Zope/lib/python/Globals.py:1.53 Wed Aug 14 18:13:16 2002
+++ Zope/lib/python/Globals.py Tue Feb 11 12:17:02 2003
@@ -23,8 +23,8 @@
import Acquisition, ComputedAttribute, App.PersistentExtra, os
import TreeDisplay
-from App.FindHomes import INSTANCE_HOME, SOFTWARE_HOME, ZOPE_HOME
from App.Common import package_home, attrget, Dictionary
+from App.config import getConfiguration as _getConfiguration
from Persistence import Persistent, PersistentMapping
from App.special_dtml import HTML, HTMLFile, DTMLFile
from App.class_init import default__class_init__, ApplicationDefaultPermissions
@@ -37,7 +37,14 @@
VersionNameName='Zope-Version'
-data_dir = os.path.join(INSTANCE_HOME, 'var')
+_cfg = _getConfiguration()
+data_dir = _cfg.clienthome
+
+# backward compatibility
+INSTANCE_HOME = _cfg.instancehome
+SOFTWARE_HOME = _cfg.softwarehome
+ZOPE_HOME = _cfg.zopehome
+
opened=[]
# Check,if DEBUG variables are set