diff options
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py index 5e4fa7223f..097d96a3f4 100644 --- a/source4/scripting/python/samba/__init__.py +++ b/source4/scripting/python/samba/__init__.py @@ -158,7 +158,11 @@ class Ldb(ldb.Ldb): for msg in res: erase_recursive(self, msg.dn) - self.delete(dn) + try: + self.delete(dn) + except ldb.LdbError, (ldb.ERR_NO_SUCH_OBJECT, _): + # Ignore no such object errors + pass res = self.search("", ldb.SCOPE_BASE, "(objectClass=*)", ["namingContexts"]) |