fix #284
authorArmin Ronacher <armin.ronacher@active-4.com>
Tue, 6 Nov 2007 18:01:09 +0000 (19:01 +0100)
committerArmin Ronacher <armin.ronacher@active-4.com>
Tue, 6 Nov 2007 18:01:09 +0000 (19:01 +0100)
--HG--
branch : trunk

jinja/_speedups.c
jinja/parser.py

index 70f0bf1b965115ccd08ea1ee799c3a2af17c8b8b..dfabf1d926f044286c7871d740fce0314e201fe5 100644 (file)
@@ -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 */
index a3a8347e49e1b019436cc59d9d7bc39dc7e2f783..44ea95401fc46b5b8a0c027ebab9425b51f141c5 100644 (file)
@@ -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: