web/views/schema.py
changeset 10668 4fb62d791073
parent 10666 7f6b5f023884
child 10740 59e89db3a67d
--- 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):