samba-tool visualize: fix python2.6 incompatibility
authorBjörn Baumbach <bb@sernet.de>
Tue, 20 Mar 2018 11:15:22 +0000 (12:15 +0100)
committerDouglas Bagnall <dbagnall@samba.org>
Wed, 21 Mar 2018 08:25:51 +0000 (09:25 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13337

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Mar 21 09:25:51 CET 2018 on sn-devel-144

python/samba/netcmd/visualize.py

index 473872a7d72871e6d36fa817df9649929b2916d9..3e5b9501e3a030bf9c8dde4600ae1858be2c3685 100644 (file)
@@ -176,7 +176,11 @@ def get_partition_maps(samdb):
         "DNSDOMAIN": "DC=DomainDnsZones,%s" % base_dn,
         "DNSFOREST": "DC=ForestDnsZones,%s" % base_dn
     }
-    long_to_short = {v: k for k, v in short_to_long.iteritems()}
+
+    long_to_short = {}
+    for s, l in short_to_long.iteritems():
+        long_to_short[l] = s
+
     return short_to_long, long_to_short