From: Armin Ronacher Date: Tue, 6 Nov 2007 18:01:09 +0000 (+0100) Subject: fix #284 X-Git-Tag: 2.0rc1~246 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8efb7ee366250ccc993788aa237b7df53152c58f;p=jinja2.git fix #284 --HG-- branch : trunk --- diff --git a/jinja/_speedups.c b/jinja/_speedups.c index 70f0bf1..dfabf1d 100644 --- a/jinja/_speedups.c +++ b/jinja/_speedups.c @@ -440,7 +440,7 @@ static PyTypeObject BaseContextType = { 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ "", /* tp_doc */ - (traverseproc)BaseContext_traverse, /* tp_traverse */ + (traverseproc)BaseContext_traverse, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ diff --git a/jinja/parser.py b/jinja/parser.py index a3a8347..44ea954 100644 --- a/jinja/parser.py +++ b/jinja/parser.py @@ -1096,9 +1096,9 @@ class Parser(object): self.stream.current.type, lineno, self.filename) else: + name = self.stream.current.value raise TemplateSyntaxError('unknown directive %r.' % - self.stream.current.type, - lineno, self.filename) + name, lineno, self.filename) else: node = handler() if node is not None: