mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +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:
committed by
Andrew Bartlett
parent
b0c9de820c
commit
09c2b71e47
@ -716,10 +716,10 @@ def full_matrix(rows,
|
|||||||
vertices.sort(key=grouping_function)
|
vertices.sort(key=grouping_function)
|
||||||
colour_list = []
|
colour_list = []
|
||||||
for k, v in groupby(vertices, key=grouping_function):
|
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)
|
colour_list.extend(c for x in v)
|
||||||
else:
|
else:
|
||||||
colour_list = [colour_cycle.next() for v in vertices]
|
colour_list = [next(colour_cycle) for v in vertices]
|
||||||
|
|
||||||
if shorten_names:
|
if shorten_names:
|
||||||
vmap, replacements = shorten_vertex_names(vertices, '+',
|
vmap, replacements = shorten_vertex_names(vertices, '+',
|
||||||
@ -812,7 +812,7 @@ def full_matrix(rows,
|
|||||||
10 ** digits - 1))
|
10 ** digits - 1))
|
||||||
|
|
||||||
if shorten_names:
|
if shorten_names:
|
||||||
example_c = colour_cycle.next()
|
example_c = next(colour_cycle)
|
||||||
for substitute, original in reversed(replacements):
|
for substitute, original in reversed(replacements):
|
||||||
write("'%s%s%s' stands for '%s%s%s'" % (example_c,
|
write("'%s%s%s' stands for '%s%s%s'" % (example_c,
|
||||||
substitute,
|
substitute,
|
||||||
|
Reference in New Issue
Block a user