mirror of
https://github.com/samba-team/samba.git
synced 2025-07-30 19:42:05 +03:00
python/samba: PY3 port for ridalloc_exop test to work
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
dcbdae15b2
commit
fc13a1268a
@ -1939,8 +1939,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
|
|||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
instancetype |= dsdb.INSTANCE_TYPE_NC_ABOVE
|
instancetype |= dsdb.INSTANCE_TYPE_NC_ABOVE
|
||||||
|
if self.write_ncs is not None and str(nc_root) in [str(x) for x in self.write_ncs]:
|
||||||
if self.write_ncs is not None and str(nc_root) in self.write_ncs:
|
|
||||||
instancetype |= dsdb.INSTANCE_TYPE_WRITE
|
instancetype |= dsdb.INSTANCE_TYPE_WRITE
|
||||||
|
|
||||||
return instancetype
|
return instancetype
|
||||||
@ -2060,10 +2059,10 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
|
|||||||
self.report("ERROR: Not fixing num_values(%d) for '%s' on '%s'" %
|
self.report("ERROR: Not fixing num_values(%d) for '%s' on '%s'" %
|
||||||
(len(obj[attrname]), attrname, str(obj.dn)))
|
(len(obj[attrname]), attrname, str(obj.dn)))
|
||||||
else:
|
else:
|
||||||
object_rdn_val = obj[attrname][0]
|
object_rdn_val = str(obj[attrname][0])
|
||||||
|
|
||||||
if str(attrname).lower() == 'isdeleted':
|
if str(attrname).lower() == 'isdeleted':
|
||||||
if obj[attrname][0] != "FALSE":
|
if str(obj[attrname][0]) != "FALSE":
|
||||||
isDeleted = True
|
isDeleted = True
|
||||||
|
|
||||||
if str(attrname).lower() == 'systemflags':
|
if str(attrname).lower() == 'systemflags':
|
||||||
@ -2238,7 +2237,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
|
|||||||
|
|
||||||
if str(attrname).lower() == "instancetype":
|
if str(attrname).lower() == "instancetype":
|
||||||
calculated_instancetype = self.calculate_instancetype(dn)
|
calculated_instancetype = self.calculate_instancetype(dn)
|
||||||
if len(obj["instanceType"]) != 1 or obj["instanceType"][0] != str(calculated_instancetype):
|
if len(obj["instanceType"]) != 1 or int(obj["instanceType"][0]) != calculated_instancetype:
|
||||||
error_count += 1
|
error_count += 1
|
||||||
self.err_wrong_instancetype(obj, calculated_instancetype)
|
self.err_wrong_instancetype(obj, calculated_instancetype)
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ def offline_remove_server(samdb, logger,
|
|||||||
computer_dn = None
|
computer_dn = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
dnsHostName = msgs[0]["dnsHostName"][0]
|
dnsHostName = str(msgs[0]["dnsHostName"][0])
|
||||||
except KeyError:
|
except KeyError:
|
||||||
dnsHostName = None
|
dnsHostName = None
|
||||||
|
|
||||||
@ -268,7 +268,7 @@ def offline_remove_server(samdb, logger,
|
|||||||
samdb.delete(computer_dn, ["tree_delete:0"])
|
samdb.delete(computer_dn, ["tree_delete:0"])
|
||||||
|
|
||||||
if "dnsHostName" in msgs[0]:
|
if "dnsHostName" in msgs[0]:
|
||||||
dnsHostName = msgs[0]["dnsHostName"][0]
|
dnsHostName = str(msgs[0]["dnsHostName"][0])
|
||||||
|
|
||||||
if remove_dns_account:
|
if remove_dns_account:
|
||||||
res = samdb.search(expression="(&(objectclass=user)(cn=dns-%s)(servicePrincipalName=DNS/%s))" %
|
res = samdb.search(expression="(&(objectclass=user)(cn=dns-%s)(servicePrincipalName=DNS/%s))" %
|
||||||
|
Reference in New Issue
Block a user