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

Matthew T. Kromer matt@zope.com
Fri, 26 Oct 2001 10:48:19 -0400


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

Modified Files:
	DTMLMethod.py 
Log Message:
Route of change where DTMLMethod removed self.__dict__['validate'] and would
raise an error on duplicat removal due to recursive entry.


=== Releases/Zope/lib/python/OFS/DTMLMethod.py 1.69 => 1.70 ===
         finally:
             security.removeContext(self)
-            del self.__dict__['validate']
+            try: del self.__dict__['validate']
+            except: pass
 
         have_key=RESPONSE.headers.has_key
         if not (have_key('content-type') or have_key('Content-Type')):
@@ -213,6 +214,9 @@
         if not self._cache_namespace_keys:
             self.ZCacheable_set(result)
         return result
+
+    def validate(self, inst, parent, name, value, md=None):
+        return getSecurityManager().validate(inst, parent, name, value)
 
     def ZDocumentTemplate_beforeRender(self, md, default):
         # Tries to get a cached value.