python/samba: enclose map.values with list (py2/py3)
authorNoel Power <noel.power@suse.com>
Thu, 14 Jun 2018 14:32:03 +0000 (15:32 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 19 Jun 2018 22:18:23 +0000 (00:18 +0200)
Fix errors in samba.tests.samba_tool.visualize_drs that with python 3
will generate exception with messages something like
'can't iterate dict_values'

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

index 6290ebeeb10fbba52787f114fe63b48e9a9026a8..e80a88206672dffec8891f0009b1db791daf935a 100644 (file)
@@ -84,7 +84,7 @@ def shorten_vertex_names(vertices, suffix=',...', aggressive=False):
         # walk backwards along all the strings until we meet a character
         # that is not shared by all.
         i = -1
-        vlist = vmap.values()
+        vlist = list(vmap.values())
         try:
             while True:
                 c = set(x[i] for x in vlist)