Commit 95557af5 authored by Guido van Rossum's avatar Guido van Rossum

In evaluateText(), enforce that the return value is None or a string

(by applying str() if it is neither).
parent 9707a80b
......@@ -144,12 +144,17 @@ class DummyEngine:
return self.evaluate(expr)
def evaluateText(self, expr):
return self.evaluate(expr)
text = self.evaluate(expr)
if text is not None:
text = str(text)
return text
def evaluateStructure(self, expr):
# XXX Should return None or a DOM tree
return self.evaluate(expr)
def evaluateSequence(self, expr):
# XXX Should return a sequence
return self.evaluate(expr)
def findMacroDocument(self, macroName):
......
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