[Zope-Checkins] CVS: Zope/lib/python/OFS - DTMLMethod.py:1.68

Matthew T. Kromer matt@zope.com
Mon, 1 Oct 2001 17:03:16 -0400


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv26651/OFS

Modified Files:
	DTMLMethod.py 
Log Message:
Change DTMLMethod to call DTMLValidate, a minor performance enhancement
discovered for a media client.  DTMLValidate is just validate with
different arguments -- this eliminates an argument remapping step.


=== Zope/lib/python/OFS/DTMLMethod.py 1.67 => 1.68 ===
         security=getSecurityManager()
         security.addContext(self)
+        self.validate = security.DTMLValidate
         try:
         
             if client is None:
@@ -197,7 +198,9 @@
                     self.ZCacheable_set(r)
                 return r
 
-        finally: security.removeContext(self)
+        finally:
+            security.removeContext(self)
+            del self.validate
 
         have_key=RESPONSE.headers.has_key
         if not (have_key('content-type') or have_key('Content-Type')):