[Zope-Checkins] CVS: Zope3/lib/python/Zope/PageTemplate - PageTemplate.py:1.1.2.16
Fred L. Drake, Jr.
fdrake@acm.org
Thu, 21 Mar 2002 17:28:58 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/PageTemplate
In directory cvs.zope.org:/tmp/cvs-serv25670
Modified Files:
Tag: Zope-3x-branch
PageTemplate.py
Log Message:
Minor cleanup.
=== Zope3/lib/python/Zope/PageTemplate/PageTemplate.py 1.1.2.15 => 1.1.2.16 ===
from EngineConfig import getEngine
from cStringIO import StringIO
-from types import StringType
class MacroCollection(object):
@@ -54,7 +53,7 @@
passed to the TALES expression engine, then calls pt_render()
to perform the rendering.
"""
-
+
content_type = 'text/html'
expand = 1
_v_errors = ()
@@ -116,8 +115,8 @@
return self._v_warnings
def write(self, text):
- assert isinstance(text, StringType)
- if text[:len(self._error_start)] == self._error_start:
+ assert isinstance(text, str)
+ if text.startswith(self._error_start):
errend = text.find('-->')
if errend >= 0:
text = text[errend + 4:]