[Zope-Checkins]
SVN: Zope/trunk/lib/python/Products/PageTemplates/ZRPythonExpr.py
Forward port fix for Collector #1914.
Tres Seaver
tseaver at palladion.com
Tue Oct 11 11:36:27 EDT 2005
Log message for revision 39045:
Forward port fix for Collector #1914.
Changed:
U Zope/trunk/lib/python/Products/PageTemplates/ZRPythonExpr.py
-=-
Modified: Zope/trunk/lib/python/Products/PageTemplates/ZRPythonExpr.py
===================================================================
--- Zope/trunk/lib/python/Products/PageTemplates/ZRPythonExpr.py 2005-10-11 15:19:18 UTC (rev 39044)
+++ Zope/trunk/lib/python/Products/PageTemplates/ZRPythonExpr.py 2005-10-11 15:36:27 UTC (rev 39045)
@@ -62,8 +62,11 @@
def call_with_ns(f, ns, arg=1):
td = Rtd()
- td.this = ns['here']
- td._push(ns['request'])
+ # prefer 'context' to 'here'; fall back to 'None'
+ this = ns.get('context', ns.get('here'))
+ td.this = this
+ request = ns.get('request', {})
+ td._push(request)
td._push(InstanceDict(td.this, td))
td._push(ns)
try:
More information about the Zope-Checkins
mailing list