mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s4-tests: Added a common definition of delete_force.
This commit is contained in:
parent
64424bb1c3
commit
db5bcb7115
@ -175,3 +175,9 @@ def connect_samdb_ex(samdb_url, lp=None, session_info=None,
|
||||
# fetch RootDse
|
||||
res = sam_db.search(base="", expression="", scope=ldb.SCOPE_BASE, attrs=["*"])
|
||||
return (sam_db, res[0])
|
||||
|
||||
def delete_force(samdb, dn):
|
||||
try:
|
||||
samdb.delete(dn)
|
||||
except ldb.LdbError, (num, _):
|
||||
assert(num == ldb.ERR_NO_SUCH_OBJECT)
|
||||
|
Loading…
Reference in New Issue
Block a user