Skip to content

Commit b5e9f1f

Browse files
committed
Replace False return values with empty list to prevent crashes
1 parent 7f32330 commit b5e9f1f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

nxc/protocols/ldap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ def getUnixTime(self, t):
693693
t /= 10000000
694694
return t
695695

696-
def search(self, searchFilter, attributes, sizeLimit=0):
696+
def search(self, searchFilter, attributes, sizeLimit=0) -> list:
697697
try:
698698
if self.ldapConnection:
699699
self.logger.debug(f"Search Filter={searchFilter}")
@@ -713,8 +713,8 @@ def search(self, searchFilter, attributes, sizeLimit=0):
713713
e.getAnswers()
714714
else:
715715
self.logger.fail(e)
716-
return False
717-
return False
716+
return []
717+
return []
718718

719719
def users(self):
720720
"""

0 commit comments

Comments
 (0)