diff hgext/highlight/highlight.py @ 29216:ead25aa27a43

py3: convert to next() function next(..) was introduced in py2.6 and .next() is not available in py3 https://docs.python.org/2/library/functions.html#next
author timeless <timeless@mozdev.org>
date Mon, 16 May 2016 21:30:53 +0000
parents b502138f5faa
children 6a98f9408a50
line wrap: on
line diff
--- a/hgext/highlight/highlight.py	Mon May 16 21:30:32 2016 +0000
+++ b/hgext/highlight/highlight.py	Mon May 16 21:30:53 2016 +0000
@@ -68,7 +68,7 @@
     coloriter = (s.encode(encoding.encoding, 'replace')
                  for s in colorized.splitlines())
 
-    tmpl.filters['colorize'] = lambda x: coloriter.next()
+    tmpl.filters['colorize'] = lambda x: next(coloriter)
 
     oldl = tmpl.cache[field]
     newl = oldl.replace('line|escape', 'line|colorize')