From: Joe Guo Date: Tue, 10 Apr 2018 03:42:42 +0000 (+1200) Subject: kcc/kcc_utils: convert dict.keys to list X-Git-Tag: ldb-1.4.0~586 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=09081eae3d821352786dfb38630ae10e6072040e;p=thirdparty%2Fsamba.git kcc/kcc_utils: convert dict.keys to list In py3, `dict.keys()` will return a iterator not a list. Convert it to list to support both py2 and py3. Signed-off-by: Joe Guo Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/python/samba/kcc/graph_utils.py b/python/samba/kcc/graph_utils.py index 6e32100e004..086b6512201 100644 --- a/python/samba/kcc/graph_utils.py +++ b/python/samba/kcc/graph_utils.py @@ -235,7 +235,7 @@ def verify_graph_directed_double_ring(edges, vertices, edge_vertices): raise GraphError("wanted double directed ring, found a leaf node" "(%s)" % vertex) - for vertex in edge_map.keys(): + for vertex in list(edge_map.keys()): nset = edge_map[vertex] if not nset: continue