py/graph: use 2.6 compatible check for set membership
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 19 Mar 2019 23:02:09 +0000 (12:02 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 20 Mar 2019 06:36:05 +0000 (06:36 +0000)
It is better this way anyway.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Mar 20 06:36:05 UTC 2019 on sn-devel-144

python/samba/graph.py

index 0a0aecd66315c3450656faa8e3c26b5c66c4be97..c8d5f9230d071e0890c6a44aef5826affe914a66 100644 (file)
@@ -88,7 +88,7 @@ def shorten_vertex_names(vertices, suffix=',...', aggressive=False):
         try:
             while True:
                 c = set(x[i] for x in vlist)
-                if len(c) > 1 or c == {'*'}:
+                if len(c) > 1 or '*' in c:
                     break
                 i -= 1
         except IndexError: