better exception handling for ldap errors

This commit is contained in:
odumasFR 2018-10-01 23:08:45 +02:00 committed by GitHub
parent 51043837f0
commit 3f2d14327c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,7 +176,7 @@ class User(db.Model):
for member in group[0][1]['memberOf']:
result += self.ad_recursive_groups( member.decode("utf-8") )
return result
except:
except ldap.LDAPError as e:
logging.exception("Recursive AD Group search error")
return result