add isempty function
This commit is contained in:
parent
cd9592c7cb
commit
4f954c97d7
7
lgit.py
7
lgit.py
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user