diff options
author | Matthew Wilkes <matthew@matthewwilkes.co.uk> | 2008-12-06 13:25:25 +0000 |
---|---|---|
committer | Matthew Wilkes <matthew@matthewwilkes.co.uk> | 2008-12-06 13:25:25 +0000 |
commit | 983e028f398e0506dd4af7989165bd1a2ac32ac6 (patch) | |
tree | edfda01d3d57b5852d3d86c0ef3fa5dc8cb51428 | |
parent | b4f58659cc1f4e05ce34605d7944fb15ffa3fe7d (diff) | |
download | zope-tal-983e028f398e0506dd4af7989165bd1a2ac32ac6.tar.gz |
assert isn't a function, using parens will cause the two arguments to be treated as a 2-tuple, hence always true.
-rw-r--r-- | src/zope/tal/dummyengine.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/zope/tal/dummyengine.py b/src/zope/tal/dummyengine.py index 26109ad..2cb2310 100644 --- a/src/zope/tal/dummyengine.py +++ b/src/zope/tal/dummyengine.py @@ -85,8 +85,8 @@ class DummyEngine(object): return value def evaluate(self, expression): - assert (expression.startswith("$") and expression.endswith("$"), - expression) + assert expression.startswith("$") and expression.endswith("$"), \ + expression expression = expression[1:-1] m = name_match(expression) if m: @@ -152,8 +152,8 @@ class DummyEngine(object): return self.evaluate(expr) def evaluateMacro(self, macroName): - assert (macroName.startswith("$") and macroName.endswith("$"), - macroName) + assert macroName.startswith("$") and macroName.endswith("$"), \ + macroName macroName = macroName[1:-1] file, localName = self.findMacroFile(macroName) if not file: |