1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

python/samba: Another object.next() to next(object) py2/py3 converstion

fix samba.tests.samba_tool.visualize_drs

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Noel Power 2018-06-14 15:48:36 +01:00 committed by Andrew Bartlett
parent b0c9de820c
commit 09c2b71e47

View 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,