Commit 3a4c60ef authored by Evan Simpson's avatar Evan Simpson

Resync with changed implementation of 'item' in ZTUtils.Iterator.

parent 9850e579
......@@ -17,7 +17,7 @@ Page Template-specific implementation of TALES, with handlers
for Python expressions, string literals, and paths.
"""
__version__='$Revision: 1.28 $'[11:-2]
__version__='$Revision: 1.29 $'[11:-2]
import re, sys
from TALES import Engine, CompilerError, _valid_name, NAME_RE, \
......@@ -25,6 +25,7 @@ from TALES import Engine, CompilerError, _valid_name, NAME_RE, \
from string import strip, split, join, replace, lstrip
from Acquisition import aq_base, aq_inner, aq_parent
_engine = None
def getEngine():
global _engine
......@@ -254,11 +255,10 @@ def restrictedTraverse(self, path, securityManager,
raise Unauthorized, name
i = 1
plen = len(path)
REQUEST={'TraversalRequestNameStack': path}
validate = securityManager.validate
object = self
while i < plen:
while i < len(path):
__traceback_info__ = (path, i)
name = path[i]
i = i + 1
......
......@@ -15,7 +15,7 @@
An implementation of a generic TALES engine
"""
__version__='$Revision: 1.26 $'[11:-2]
__version__='$Revision: 1.27 $'[11:-2]
import re, sys, ZTUtils
from MultiMapping import MultiMapping
......@@ -109,7 +109,7 @@ class Iterator(ZTUtils.Iterator):
def next(self):
try:
if ZTUtils.Iterator.next(self):
self._context.setLocal(self.name, self.item())
self._context.setLocal(self.name, self.item)
return 1
except TALESError:
raise
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment