Commit 9a595cb2 authored by Fred Drake's avatar Fred Drake

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.
parent e3c3c631
......@@ -15,7 +15,7 @@
HTML- and XML-based template objects using TAL, TALES, and METAL.
"""
__version__='$Revision: 1.29 $'[11:-2]
__version__='$Revision: 1.30 $'[11:-2]
import sys
......@@ -139,8 +139,7 @@ class PageTemplate(Base):
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
......@@ -155,6 +154,10 @@ class PageTemplate(Base):
'\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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment