changeset 1170:6a9a5af49b97 beta

pep8
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 22 Mar 2011 21:50:54 +0100
parents f6dca275c5a8
children 2ab211e0aecd
files rhodecode/lib/auth_ldap.py
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/auth_ldap.py	Tue Mar 22 18:10:37 2011 +0100
+++ b/rhodecode/lib/auth_ldap.py	Tue Mar 22 21:50:54 2011 +0100
@@ -99,8 +99,10 @@
                 server.simple_bind_s(self.LDAP_BIND_DN, self.LDAP_BIND_PASS)
 
             filt = '(&%s(%s=%s))' % (self.LDAP_FILTER, self.attr_login, username)
-            log.debug("Authenticating %r filt %s at %s", self.BASE_DN, filt, self.LDAP_SERVER)
-            lobjects = server.search_ext_s(self.BASE_DN, self.SEARCH_SCOPE, filt)
+            log.debug("Authenticating %r filt %s at %s", self.BASE_DN,
+                      filt, self.LDAP_SERVER)
+            lobjects = server.search_ext_s(self.BASE_DN, self.SEARCH_SCOPE,
+                                           filt)
 
             if not lobjects:
                 raise ldap.NO_SUCH_OBJECT()
@@ -111,10 +113,12 @@
                     break
 
                 except ldap.INVALID_CREDENTIALS, e:
-                    log.debug("LDAP rejected password for user '%s' (%s): %s", uid, username, dn)
+                    log.debug("LDAP rejected password for user '%s' (%s): %s",
+                              uid, username, dn)
 
                 else:
-                    log.debug("No matching LDAP objecs for authentication of '%s' (%s)", uid, username)
+                    log.debug("No matching LDAP objects for authentication "
+                              "of '%s' (%s)", uid, username)
                     raise LdapPasswordError()
 
         except ldap.NO_SUCH_OBJECT, e: