[ZPT] CVS: Products/PageTemplates - Expressions.py:1.28 TALES.py:1.26

Tres Seaver tseaver@zope.com
Tue, 11 Dec 2001 14:56:03 -0500


Update of /cvs-repository/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv11619

Modified Files:
	Expressions.py TALES.py 
Log Message:


  - Suppress raise of Undefined when the expression is an 'exists:'.

  - Stash referenced object, rather than bound method, as local value
    for iterator.


=== Products/PageTemplates/Expressions.py 1.27 => 1.28 ===
                 break
             except Undefined:
-                if not more_paths:
+                if self._name != 'exists' and not more_paths:
                     raise
             except (AttributeError, KeyError, TypeError, IndexError,
                     Unauthorized), e:
-                if not more_paths:
+                if self._name != 'exists' and not more_paths:
                     raise Undefined(self._s, sys.exc_info())
 
         if self._name == 'exists':


=== Products/PageTemplates/TALES.py 1.25 => 1.26 ===
         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