summaryrefslogtreecommitdiff
path: root/python/samba/dbchecker.py
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2019-03-19 13:16:59 +0100
committerStefan Metzmacher <metze@samba.org>2019-03-21 18:15:20 +0000
commit261ef9d5b62f0d49f858717e6d8b4b41f008efb5 (patch)
tree43baff403de4246bcbc77e07acf923e3cfb18a29 /python/samba/dbchecker.py
parentdd6f0dad218ec1d5aa38ea8aa6848ec81035cb3f (diff)
downloadsamba-261ef9d5b62f0d49f858717e6d8b4b41f008efb5.tar.gz
dbcheck: fix the err_empty_attribute() check
ldb.bytes('') == '' is never True in python3, we nee ldb.bytes('') == b'' in order to check that on attribute has an empty value, that seems to work for python2 and python3. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13843 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Noel Power <npower@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Mar 21 18:15:20 UTC 2019 on sn-devel-144
Diffstat (limited to 'python/samba/dbchecker.py')
-rw-r--r--python/samba/dbchecker.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py
index c4747811c76..a0500c6c578 100644
--- a/python/samba/dbchecker.py
+++ b/python/samba/dbchecker.py
@@ -2445,7 +2445,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
# check for empty attributes
for val in obj[attrname]:
- if val == '':
+ if val == b'':
self.err_empty_attribute(dn, attrname)
error_count += 1
continue