]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
FIX EXAMPLE: 450/head
authorjenisys <jenisys@users.noreply.github.com>
Sat, 9 May 2015 16:57:52 +0000 (18:57 +0200)
committerjenisys <jenisys@users.noreply.github.com>
Sat, 9 May 2015 16:57:52 +0000 (18:57 +0200)
No longer working with current code base
since the TokenStream.next() method was removed.

docs/cache_extension.py

index 8fdefb5c59de761d444de794e92ae4075865c2df..ccdefa2ff313e6fb1d61c340075468bc3eb06878 100644 (file)
@@ -20,7 +20,7 @@ class FragmentCacheExtension(Extension):
         # we only listen to ``'cache'`` so this will be a name token with
         # `cache` as value.  We get the line number so that we can give
         # that line number to the nodes we create by hand.
-        lineno = parser.stream.next().lineno
+        lineno = next(parser.stream).lineno
 
         # now we parse a single expression that is used as cache key.
         args = [parser.parse_expression()]