[Zope3-checkins] CVS: Zope3/src/zope/app - _app.py:1.14

Jim Fulton jim at zope.com
Mon Aug 4 08:11:31 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app
In directory cvs.zope.org:/tmp/cvs-serv14606/src/zope/app

Modified Files:
	_app.py 
Log Message:
Added an execute option to config and changes it to return the context
created by xmlconfig.file. This is to support parting and analyzing
configuration files without executing action, mainly so that we can
get hold of the i18n strings.


=== Zope3/src/zope/app/_app.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/_app.py:1.13	Mon Jul 28 18:20:19 2003
+++ Zope3/src/zope/app/_app.py	Mon Aug  4 07:11:27 2003
@@ -25,7 +25,7 @@
 __metaclass__ = type
 
 _configured = 0
-def config(file):
+def config(file, execute=True):
     "Configure site globals"
     global _configured
 
@@ -40,13 +40,15 @@
     newSecurityManager(system_user)
 
     # Load server-independent site config
-    xmlconfig.file(file)
+    context = xmlconfig.file(file, execute=execute)
 
     # Reset user
     from zope.security.management import noSecurityManager
     noSecurityManager()
 
-    _configured = 1
+    _configured = execute
+
+    return context
 
 def database(db):
     if type(db) is str:




More information about the Zope3-Checkins mailing list