From 82c49b0a8c0ea34fbfcdf0a208dec62f21885845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= Date: Tue, 20 Mar 2018 12:15:22 +0100 Subject: [PATCH 1/2] samba-tool visualize: fix python2.6 incompatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG: https://bugzilla.samba.org/show_bug.cgi?id=13337 Signed-off-by: Björn Baumbach Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall Autobuild-User(master): Douglas Bagnall Autobuild-Date(master): Wed Mar 21 09:25:51 CET 2018 on sn-devel-144 (cherry picked from commit 9312a1cdafbd5a0140d72502487c4e478dc578d2) --- python/samba/netcmd/visualize.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.16.1 From 9fd69ad866e4e7f2adf2f71bd2dcfe2bb3fb3e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= Date: Thu, 15 Mar 2018 18:32:31 +0100 Subject: [PATCH 2/2] ms_schema: fix python2.6 incompatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG: https://bugzilla.samba.org/show_bug.cgi?id=13337 Signed-off-by: Björn Baumbach Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall (cherry picked from commit a27db0b61e40b6b503b53e3579867e227f1971b8) --- python/samba/ms_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/samba/ms_schema.py b/python/samba/ms_schema.py index a8c936300bf..53ec02da886 100644 --- a/python/samba/ms_schema.py +++ b/python/samba/ms_schema.py @@ -277,7 +277,7 @@ def __transform_entry(entry, objectClass): header.append(["objectGUID", str(uuid.uuid4()), False]) - entry = header + [x for x in entry if x[0].lower() not in {'dn', 'changetype', 'objectcategory'}] + entry = header + [x for x in entry if x[0].lower() not in set(['dn', 'changetype', 'objectcategory'])] return entry -- 2.16.1