git.samba.org
/
kamenim
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
410114e
)
s4:python Allow 'no such object' on the delete of the DN
author
Andrew Bartlett
<abartlet@samba.org>
Thu, 13 Aug 2009 22:46:13 +0000
(08:46 +1000)
committer
Andrew Bartlett
<abartlet@samba.org>
Sun, 16 Aug 2009 23:50:59 +0000
(09:50 +1000)
This fixes the recursive delete in erase_partitions()
For reasons I cannot understand, it is possible to get 'no such
object' trying to delete a DN I just search for without error. Oh
well...
Andrew Bartlett
source4/scripting/python/samba/__init__.py
patch
|
blob
|
history
diff --git
a/source4/scripting/python/samba/__init__.py
b/source4/scripting/python/samba/__init__.py
index 5e4fa7223f5517bfbf268dcaafe7458176abcba0..097d96a3f4ecaf32d69d85da66863ca4b86b92dd 100644
(file)
--- 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"])