[Zope-Checkins] CVS: Zope/lib/python/Products/PageTemplates - PageTemplate.py:1.30
Fred L. Drake, Jr.
fred@zope.com
Fri, 21 Mar 2003 14:17:33 -0500
Update of /cvs-repository/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv19930
Modified Files:
PageTemplate.py
Log Message:
Use the same _cook_check() / _cook() arrangement as the Zope 3
implementation, to allow the PageTemplateFile class to override what
happens when the check is performed.
=== Zope/lib/python/Products/PageTemplates/PageTemplate.py 1.29 => 1.30 ===
--- Zope/lib/python/Products/PageTemplates/PageTemplate.py:1.29 Thu Sep 19 10:39:24 2002
+++ Zope/lib/python/Products/PageTemplates/PageTemplate.py Fri Mar 21 14:17:32 2003
@@ -139,8 +139,7 @@
self._cook()
def read(self):
- if not self._v_cooked:
- self._cook()
+ self._cook_check()
if not self._v_errors:
if not self.expand:
return self._text
@@ -154,6 +153,10 @@
return ('%s\n %s\n-->\n%s' % (self._error_start,
'\n '.join(self._v_errors),
self._text))
+
+ def _cook_check(self):
+ if not self._v_cooked:
+ self._cook()
def _cook(self):
"""Compile the TAL and METAL statments.