python/samba: Another object.next() to next(object) py2/py3 converstion
authorNoel Power <noel.power@suse.com>
Thu, 14 Jun 2018 14:48:36 +0000 (15:48 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 19 Jun 2018 22:18:22 +0000 (00:18 +0200)
fix samba.tests.samba_tool.visualize_drs

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/graph.py

index 0c389a74e3ad856df4cec6a6d37d44093fd2ca24..6290ebeeb10fbba52787f114fe63b48e9a9026a8 100644 (file)
@@ -716,10 +716,10 @@ def full_matrix(rows,
         vertices.sort(key=grouping_function)
         colour_list = []
         for k, v in groupby(vertices, key=grouping_function):
-            c = colour_cycle.next()
+            c = next(colour_cycle)
             colour_list.extend(c for x in v)
     else:
-        colour_list = [colour_cycle.next() for v in vertices]
+        colour_list = [next(colour_cycle) for v in vertices]
 
     if shorten_names:
         vmap, replacements = shorten_vertex_names(vertices, '+',
@@ -812,7 +812,7 @@ def full_matrix(rows,
                    10 ** digits - 1))
 
     if shorten_names:
-        example_c = colour_cycle.next()
+        example_c = next(colour_cycle)
         for substitute, original in reversed(replacements):
             write("'%s%s%s' stands for '%s%s%s'" % (example_c,
                                                     substitute,