[ZPT] CVS: Zope27/lib/python/Products/PageTemplates - Expressions.py:1.35.18.3

Fred L. Drake, Jr. fdrake@acm.org
Tue, 17 Sep 2002 14:41:18 -0400


Update of /cvs-repository/Zope27/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv610

Modified Files:
      Tag: Zope-2_7-development-branch
	Expressions.py 
Log Message:
validate2():  This is called a lot and does very little, so let's
              remove one opcode (the logical negation).


=== Zope27/lib/python/Products/PageTemplates/Expressions.py 1.35.18.2 => 1.35.18.3 ===
--- Zope27/lib/python/Products/PageTemplates/Expressions.py:1.35.18.2	Sun Sep 15 16:36:56 2002
+++ Zope27/lib/python/Products/PageTemplates/Expressions.py	Tue Sep 17 14:41:18 2002
@@ -372,6 +372,6 @@
 
 
 def validate2(orig, inst, name, v, real_validate):
-    if not real_validate(orig, inst, name, v):
-        raise Unauthorized, name
-    return 1
+    if real_validate(orig, inst, name, v):
+        return 1
+    raise Unauthorized, name