Commit 879a01f0 authored by Florent Guillaume's avatar Florent Guillaume

Fixed use of 'find' from the old string module.

parent a52cd58e
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
HTML- and XML-based template objects using TAL, TALES, and METAL. HTML- and XML-based template objects using TAL, TALES, and METAL.
""" """
__version__='$Revision: 1.26 $'[11:-2] __version__='$Revision: 1.27 $'[11:-2]
import sys import sys
...@@ -131,7 +131,7 @@ class PageTemplate(Base): ...@@ -131,7 +131,7 @@ class PageTemplate(Base):
def write(self, text): def write(self, text):
assert type(text) is type('') assert type(text) is type('')
if text[:len(self._error_start)] == self._error_start: if text[:len(self._error_start)] == self._error_start:
errend = find(text, '-->') errend = text.find('-->')
if errend >= 0: if errend >= 0:
text = text[errend + 4:] text = text[errend + 4:]
if self._text != text: if self._text != text:
......
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