From 60ad8c48860e551c6baa4515b66d8bf682f0b1fc Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Mar 2019 13:16:59 +0100 Subject: [PATCH] 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 Reviewed-by: Noel Power Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Thu Mar 21 18:15:20 UTC 2019 on sn-devel-144 (cherry picked from commit 261ef9d5b62f0d49f858717e6d8b4b41f008efb5) --- python/samba/dbchecker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py index d341983738a3..e7ec426de541 100644 --- a/python/samba/dbchecker.py +++ b/python/samba/dbchecker.py @@ -2435,7 +2435,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 -- 2.17.1