summaryrefslogtreecommitdiff
path: root/python/samba/dbchecker.py
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2018-09-07 12:42:19 +0100
committerAndrew Bartlett <abartlet@samba.org>2018-09-15 15:18:26 +0200
commitfc13a1268a4a9de94efd312a8309aa55d331ae19 (patch)
tree0d416843be983b44144bbdf6d183150a5789f0be /python/samba/dbchecker.py
parentdcbdae15b2dbf71458d81aa39575cbd7aa579732 (diff)
downloadsamba-fc13a1268a4a9de94efd312a8309aa55d331ae19.tar.gz
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>
Diffstat (limited to 'python/samba/dbchecker.py')
-rw-r--r--python/samba/dbchecker.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py
index 4459d77f02d..675c92e2205 100644
--- a/python/samba/dbchecker.py
+++ b/python/samba/dbchecker.py
@@ -1939,8 +1939,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
raise
else:
instancetype |= dsdb.INSTANCE_TYPE_NC_ABOVE
-
- if self.write_ncs is not None and str(nc_root) in self.write_ncs:
+ if self.write_ncs is not None and str(nc_root) in [str(x) for x in self.write_ncs]:
instancetype |= dsdb.INSTANCE_TYPE_WRITE
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'" %
(len(obj[attrname]), attrname, str(obj.dn)))
else:
- object_rdn_val = obj[attrname][0]
+ object_rdn_val = str(obj[attrname][0])
if str(attrname).lower() == 'isdeleted':
- if obj[attrname][0] != "FALSE":
+ if str(obj[attrname][0]) != "FALSE":
isDeleted = True
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":
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
self.err_wrong_instancetype(obj, calculated_instancetype)