mirror of
https://github.com/kakwa/ldapcherry
synced 2024-12-22 21:00:04 +01:00
don't stop on UserDoesntExist exception on delete
previously, if a user didn't exist in one backend, the _deleteuser function in ldapcherry would stop on the UserDoesntExist exception, potentially leaving the user in other backends. Now it logs it and continues to delete the user in other backend.
This commit is contained in:
parent
cf97f01245
commit
fec09b1543
@ -847,7 +847,14 @@ class LdapCherry(object):
|
||||
admin = sess.get(SESSION_KEY, None)
|
||||
|
||||
for b in self.backends:
|
||||
self.backends[b].del_user(username)
|
||||
try:
|
||||
self.backends[b].del_user(username)
|
||||
except UserDoesntExist as e:
|
||||
cherrypy.log.error(
|
||||
msg="User '" + username +
|
||||
"' didn't exist in backend '" + b + "'",
|
||||
severity=logging.INFO
|
||||
)
|
||||
cherrypy.log.error(
|
||||
msg="user '" + username + "' deleted from backend '" + b + "'",
|
||||
severity=logging.DEBUG
|
||||
|
Loading…
x
Reference in New Issue
Block a user