1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00

samba-tool: disable validation on removing an empty attribute in dbcheck

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Jun 14 10:49:34 CEST 2011 on sn-devel-104
This commit is contained in:
Andrew Tridgell 2011-06-14 16:43:10 +10:00
parent 2320221105
commit d575b2b0ab

View File

@ -51,7 +51,7 @@ def empty_attribute(self, dn, attrname):
m.dn = dn
m[attrname] = ldb.MessageElement('', ldb.FLAG_MOD_DELETE, attrname)
try:
self.samdb.modify(m, ["relax:0"])
self.samdb.modify(m, controls=["relax:0"], validate=False)
except Exception, msg:
print("Failed to remove empty attribute %s : %s" % (attrname, msg))
return