[ZPT] CVS: Packages/Products/PageTemplates (Products/DC/PageTemplates) - TALES.py:1.7.2.1

evan@serenade.digicool.com evan@serenade.digicool.com
Tue, 1 May 2001 01:07:21 -0400


Update of /cvs-repository/Packages/Products/PageTemplates
In directory serenade.digicool.com:/home/evan/Zope/pt/lib/python/Products/PageTemplates

Modified Files:
      Tag: zpt-1_2
	TALES.py 
Log Message:
Merge bug fix from trunk



--- Updated File TALES.py in package Packages/Products/PageTemplates --
--- TALES.py	2001/04/27 20:54:27	1.7
+++ TALES.py	2001/05/01 05:07:20	1.7.2.1
@@ -262,11 +262,14 @@
     evaluateValue = evaluate
 
     def evaluateBoolean(self, expr):
-        return not not self.evaluate(expr)
+        bool = self.evaluate(expr)
+        if bool is Undefined:
+            return bool
+        return not not bool
 
     def evaluateText(self, expr):
         text = self.evaluate(expr)
-        if text is not None:
+        if text not in (None, Undefined):
             text = str(text)
         return text