dbcheck: err_normalise-mismatch_replace: no msg if no error
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 3 Dec 2020 22:53:48 +0000 (11:53 +1300)
committerNoel Power <npower@samba.org>
Wed, 9 Dec 2020 17:04:23 +0000 (17:04 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed Dec  9 17:04:23 UTC 2020 on sn-devel-184

python/samba/dbchecker.py

index 67583376323abe7caa210b6424fd22be47d53bd4..28b56edaafbd134927ef4eaa379c86ca70a8a6c9 100644 (file)
@@ -513,10 +513,11 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
     def err_normalise_mismatch_replace(self, dn, attrname, values):
         '''fix attribute normalisation and/or sort errors'''
         normalised = self.samdb.dsdb_normalise_attributes(self.samdb_schema, attrname, values)
-        self.report("ERROR: Normalisation error for attribute '%s' in '%s'" % (attrname, dn))
-        self.report("Values/Order of values do/does not match: %s/%s!" % (values, list(normalised)))
         if list(normalised) == values:
+            # how we got here is a mystery.
             return
+        self.report("ERROR: Normalisation error for attribute '%s' in '%s'" % (attrname, dn))
+        self.report("Values/Order of values do/does not match: %s/%s!" % (values, list(normalised)))
         if not self.confirm_all("Fix normalisation for '%s' from '%s'?" % (attrname, dn), 'fix_all_normalisation'):
             self.report("Not fixing attribute '%s'" % attrname)
             return