[web/views] use next builtin instead of next method
authorRémi Cardona <remi.cardona@logilab.fr>
Tue, 15 Sep 2015 17:10:58 +0200
changeset 10668 4fb62d791073
parent 10667 c23dc4f7467a
child 10669 155c29e0ed1c
[web/views] use next builtin instead of next method
web/views/schema.py
--- a/web/views/schema.py	Tue Sep 15 16:09:55 2015 +0200
+++ b/web/views/schema.py	Tue Sep 15 17:10:58 2015 +0200
@@ -557,8 +557,9 @@
     def __init__(self, visitor, cw):
         self.visitor = visitor
         self.cw = cw
-        self.nextcolor = cycle( ('#ff7700', '#000000',
-                                 '#ebbc69', '#888888') ).next
+        self._cycle = iter(cycle(('#ff7700', '#000000', '#ebbc69', '#888888')))
+        self.nextcolor = lambda: next(self._cycle)
+
         self.colors = {}
 
     def node_properties(self, eschema):