summaryrefslogtreecommitdiff
path: root/python/samba/remove_dc.py
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2018-04-25 20:01:49 +0100
committerNoel Power <npower@samba.org>2018-04-30 15:43:19 +0200
commitb54472f868dc491579b471db6c6660bb03ab51c3 (patch)
treee8ac495eea482a988c004e702c8a0bbd63ab84cb /python/samba/remove_dc.py
parent13280d3db9fdbbd87c6ed2faa69b24bc7660674d (diff)
downloadsamba-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/remove_dc.py')
-rw-r--r--python/samba/remove_dc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/samba/remove_dc.py b/python/samba/remove_dc.py
index 6b86a554efa..b9726f5b84f 100644
--- a/python/samba/remove_dc.py
+++ b/python/samba/remove_dc.py
@@ -230,7 +230,7 @@ def offline_remove_server(samdb, logger,
dc_name = str(msgs[0]["cn"][0])
try:
- computer_dn = ldb.Dn(samdb, msgs[0]["serverReference"][0])
+ computer_dn = ldb.Dn(samdb, msgs[0]["serverReference"][0].decode('utf8'))
except KeyError:
computer_dn = None
@@ -295,7 +295,7 @@ def offline_remove_ntds_dc(samdb,
res = samdb.search("",
scope=ldb.SCOPE_BASE, attrs=["dsServiceName"])
assert len(res) == 1
- my_serviceName = ldb.Dn(samdb, res[0]["dsServiceName"][0])
+ my_serviceName = ldb.Dn(samdb, res[0]["dsServiceName"][0].decode('utf8'))
server_dn = ntds_dn.parent()
if my_serviceName == ntds_dn: