changeset 5768:801b80a1ba7f

ldap_login: assign server early, it is used in exception handler
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 03 Mar 2011 09:49:06 +0100
parents d01747be4a29
children c5ba615fdeeb
files MoinMoin/auth/ldap_login.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/auth/ldap_login.py	Tue Feb 22 01:06:53 2011 +0100
+++ b/MoinMoin/auth/ldap_login.py	Thu Mar 03 09:49:06 2011 +0100
@@ -132,6 +132,7 @@
             try:
                 u = None
                 dn = None
+                server = self.server_uri
                 coding = self.coding
                 logging.debug("Setting misc. ldap options...")
                 ldap.set_option(ldap.OPT_PROTOCOL_VERSION, ldap.VERSION3) # ldap v2 is outdated
@@ -151,7 +152,6 @@
                         if value is not None:
                             ldap.set_option(option, value)
 
-                server = self.server_uri
                 logging.debug("Trying to initialize %r." % server)
                 l = ldap.initialize(server)
                 logging.debug("Connected to LDAP server %r." % server)