diff --git a/python/samba/netcmd/visualize.py b/python/samba/netcmd/visualize.py index 473872a7d72..3e5b9501e3a 100644 --- a/python/samba/netcmd/visualize.py +++ b/python/samba/netcmd/visualize.py @@ -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