server/ldaputils.py
changeset 8695 358d8bed9626
parent 8683 d537786e52b8
child 8905 c8fc3e3b46e4
--- a/server/ldaputils.py	Thu Feb 14 15:39:23 2013 +0100
+++ b/server/ldaputils.py	Thu Feb 14 15:38:25 2013 +0100
@@ -212,7 +212,7 @@
         # check password by establishing a (unused) connection
         try:
             self._connect(user, password)
-        except ldap.LDAPError, ex:
+        except ldap.LDAPError as ex:
             # Something went wrong, most likely bad credentials
             self.info('while trying to authenticate %s: %s', user, ex)
             raise AuthenticationError()
@@ -305,7 +305,7 @@
             self.info('ldap NO SUCH OBJECT %s %s %s', base, scope, searchstr)
             self._process_no_such_object(session, base)
             return []
-        # except ldap.REFERRAL, e:
+        # except ldap.REFERRAL as e:
         #     cnx = self.handle_referral(e)
         #     try:
         #         res = cnx.search_s(base, scope, searchstr, attrs)