[Zope-Checkins] CVS: Zope/lib/python/Zope/Startup - run.py:1.1.2.7
Andreas Jung
andreas at andreas-jung.com
Tue May 18 11:34:29 EDT 2004
Update of /cvs-repository/Zope/lib/python/Zope/Startup
In directory cvs.zope.org:/tmp/cvs-serv1917/lib/python/Zope/Startup
Modified Files:
Tag: Zope-2_7-branch
run.py
Log Message:
Collector #1233: applied new patch for ZOPE_CONFIG env. variable
=== Zope/lib/python/Zope/Startup/run.py 1.1.2.6 => 1.1.2.7 ===
--- Zope/lib/python/Zope/Startup/run.py:1.1.2.6 Sun May 16 11:09:54 2004
+++ Zope/lib/python/Zope/Startup/run.py Tue May 18 11:34:28 2004
@@ -18,12 +18,15 @@
opts = _setconfig()
start_zope(opts.configroot)
-def configure(configfile):
+def configure(configfile=None):
""" Provide an API which allows scripts like zopectl to configure
Zope before attempting to do 'app = Zope.app(). Should be used as
follows: from Zope.Startup.run import configure;
configure('/path/to/configfile'); import Zope; app = Zope.app() """
from Zope.Startup import ZopeStarter
+ if not configfile:
+ import os
+ configfile = os.getenv("ZOPE_CONFIG")
opts = _setconfig(configfile)
starter = ZopeStarter(opts.configroot)
starter.setupSecurityOptions()
@@ -34,7 +37,6 @@
accept a configfile argument (string path) in order to specify
where the configuration file exists. """
from Zope.Startup import options, handlers
- from App import config
opts = options.ZopeOptions()
if configfile:
opts.configfile=configfile
More information about the Zope-Checkins
mailing list