1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-07 20:23:50 +03:00

r26536: More tests for provisioning code.

This commit is contained in:
Jelmer Vernooij
2007-12-19 23:27:31 +01:00
committed by Stefan Metzmacher
parent 40bf88c8a7
commit 43c8bfeedf
6 changed files with 40 additions and 24 deletions

View File

@@ -92,7 +92,9 @@ class Ldb(ldb.Ldb):
res = self.search(basedn, scope, expression, [attribute])
if len(res) != 1 or res[0][attribute] is None:
return None
return res[0][attribute]
values = set(res[0][attribute])
assert len(values) == 1
return values.pop()
def erase(self):
"""Erase an ldb, removing all records."""