From: Stefan Metzmacher Date: Tue, 19 Mar 2019 12:16:59 +0000 (+0100) Subject: dbcheck: fix the err_empty_attribute() check X-Git-Tag: tdb-1.4.1~656 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=261ef9d5b62f0d49f858717e6d8b4b41f008efb5;p=thirdparty%2Fsamba.git 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 --- 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