add isempty function

This commit is contained in:
fram3d 2024-04-11 11:37:31 +02:00
parent cd9592c7cb
commit 4f954c97d7
Signed by: fram3d
GPG Key ID: 938920E709EEA32A

View File

@ -93,6 +93,13 @@ l dc values from base
return response
def isempty(self)->bool:
self.conn.search(search_base=self.base,search_filter='(objectClass=person)', attributes=['uid'])
response = self.conn.response
if response == []:
return True
return False
def gettotal(self, base: str = '')->int:
if base == '':
base = self.logbase