diff options
author | Noel Power <noel.power@suse.com> | 2018-04-25 20:01:49 +0100 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2018-04-30 15:43:19 +0200 |
commit | b54472f868dc491579b471db6c6660bb03ab51c3 (patch) | |
tree | e8ac495eea482a988c004e702c8a0bbd63ab84cb /python/samba/descriptor.py | |
parent | 13280d3db9fdbbd87c6ed2faa69b24bc7660674d (diff) | |
download | samba-b54472f868dc491579b471db6c6660bb03ab51c3.tar.gz |
python: Bulk conversion callers of ldb.Dn second param
Convert second param passed to ldb.Dn to be unicode so py2 & py3 code
will work
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'python/samba/descriptor.py')
-rw-r--r-- | python/samba/descriptor.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/samba/descriptor.py b/python/samba/descriptor.py index a9c5e1580f0..1e56e5398f8 100644 --- a/python/samba/descriptor.py +++ b/python/samba/descriptor.py @@ -415,7 +415,7 @@ def get_wellknown_sds(samdb): for nc in current[0]["namingContexts"]: dnsforestdn = ldb.Dn(samdb, "DC=ForestDnsZones,%s" % (str(samdb.get_root_basedn()))) - if ldb.Dn(samdb, nc) == dnsforestdn: + if ldb.Dn(samdb, nc.decode('utf8')) == dnsforestdn: c = (ldb.Dn(samdb, "%s" % str(dnsforestdn)), get_dns_partition_descriptor) subcontainers.append(c) c = (ldb.Dn(samdb, "CN=Infrastructure,%s" % str(dnsforestdn)), @@ -430,7 +430,7 @@ def get_wellknown_sds(samdb): continue dnsdomaindn = ldb.Dn(samdb, "DC=DomainDnsZones,%s" % (str(samdb.domain_dn()))) - if ldb.Dn(samdb, nc) == dnsdomaindn: + if ldb.Dn(samdb, nc.decode('utf8')) == dnsdomaindn: c = (ldb.Dn(samdb, "%s" % str(dnsdomaindn)), get_dns_partition_descriptor) subcontainers.append(c) c = (ldb.Dn(samdb, "CN=Infrastructure,%s" % str(dnsdomaindn)), |