[Zope3-checkins] CVS: Zope3/src/zope/app/pagetemplate -
engine.py:1.27
Jim Fulton
jim at zope.com
Tue Apr 6 16:58:14 EDT 2004
Update of /cvs-repository/Zope3/src/zope/app/pagetemplate
In directory cvs.zope.org:/tmp/cvs-serv5839/src/zope/app/pagetemplate
Modified Files:
engine.py
Log Message:
Modified the _Engine function so that it's willing
to reinitialize an existing engine.
This was needed to get test cleanup to work sanely.
=== Zope3/src/zope/app/pagetemplate/engine.py 1.26 => 1.27 ===
--- Zope3/src/zope/app/pagetemplate/engine.py:1.26 Mon Mar 8 18:35:32 2004
+++ Zope3/src/zope/app/pagetemplate/engine.py Tue Apr 6 16:58:13 2004
@@ -132,16 +132,18 @@
return context
-def _Engine():
- e = ZopeEngine()
+def _Engine(engine=None):
+ if engine is None:
+ engine = ZopeEngine()
+
for pt in ZopePathExpr._default_type_names:
- e.registerType(pt, ZopePathExpr)
- e.registerType('string', StringExpr)
- e.registerType('python', ZopePythonExpr)
- e.registerType('not', NotExpr)
- e.registerType('defer', DeferExpr)
- e.registerBaseName('modules', ProxyFactory(sys.modules))
- return e
+ engine.registerType(pt, ZopePathExpr)
+ engine.registerType('string', StringExpr)
+ engine.registerType('python', ZopePythonExpr)
+ engine.registerType('not', NotExpr)
+ engine.registerType('defer', DeferExpr)
+ engine.registerBaseName('modules', ProxyFactory(sys.modules))
+ return engine
Engine = _Engine()
More information about the Zope3-Checkins
mailing list