[CalendarServer-changes] [15698] twext/trunk/twext/who/ldap/_service.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Jun 23 17:37:50 PDT 2016


Revision: 15698
          http://trac.calendarserver.org//changeset/15698
Author:   sagen at apple.com
Date:     2016-06-23 17:37:50 -0700 (Thu, 23 Jun 2016)
Log Message:
-----------
Catch ldap constraint violation

Modified Paths:
--------------
    twext/trunk/twext/who/ldap/_service.py

Modified: twext/trunk/twext/who/ldap/_service.py
===================================================================
--- twext/trunk/twext/who/ldap/_service.py	2016-06-23 23:22:25 UTC (rev 15697)
+++ twext/trunk/twext/who/ldap/_service.py	2016-06-24 00:37:50 UTC (rev 15698)
@@ -601,6 +601,11 @@
         ):
             self.log.debug("Unable to authenticate {dn}", dn=dn)
             return False
+        except ldap.CONSTRAINT_VIOLATION:
+            self.log.info("Account locked {dn}", dn=dn)
+            return False
+        except Exception as e:
+            self.log.error("Unexpected error {error} trying to authenticate {dn}", error=str(e), dn=dn)
         finally:
             connection.unbind()
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20160623/9d92f966/attachment-0001.html>


More information about the calendarserver-changes mailing list