Update ldap.py

Signed-off-by: termanix <50464194+termanix@users.noreply.github.com>
main
termanix 2024-03-22 19:24:41 +03:00 committed by GitHub
parent e0b6f571c8
commit 6c3746643e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 11 deletions

View File

@ -846,15 +846,6 @@ class ldap(connection):
self.logger.fail(f"Skipping item, cannot process due to error {e}") self.logger.fail(f"Skipping item, cannot process due to error {e}")
def active_users(self): def active_users(self):
"""
Retrieves active user information from the LDAP server.
Args:
----
input_attributes (list): Optional. List of attributes to retrieve for each user.
Returns:
-------
None
"""
if len(self.args.active_users) > 0: if len(self.args.active_users) > 0:
arg = True arg = True
self.logger.debug(f"Dumping users: {', '.join(self.args.active_users)}") self.logger.debug(f"Dumping users: {', '.join(self.args.active_users)}")
@ -883,8 +874,8 @@ class ldap(connection):
for i in range(len(self.args.active_users)): for i in range(len(self.args.active_users)):
argsusers = [users_args[i] for i in range(len(self.args.active_users))] argsusers = [users_args[i] for i in range(len(self.args.active_users))]
except Exception as e: except Exception as e:
self.logger.debug("Exception:", exc_info=True) self.logger.debug("Exception:", exc_info=True)
self.logger.debug(f"Skipping item, cannot process due to error {e}") self.logger.debug(f"Skipping item, cannot process due to error {e}")
else: else:
argsusers = allusers argsusers = allusers