vaultmanager/lib/LDAPReader.py
def connect_to_ldap(self):
        """
        Create the connection to the LDAP server
        """
        self.logger.debug("Connecting to LDAP server")
        try:
            self.ldap_connector.simple_bind_s(self.ldap_username,
                                              self.ldap_password)
        except ldap.INVALID_CREDENTIALS as e:
            self.logger.critical(
                "LDAP: Your username or password is incorrect: " + str(e)
            )
            return False
        except ldap.SERVER_DOWN as e:
            self.logger.critical(
                "LDAP: The server appears to be down: " + str(e))
            return False
        except Exception as e:
            self.logger.critical(str(e))
            return False
        self.logger.debug("Connection successful")
        return True

        Create the connection to the LDAP server
        
Create the connection to the LDAP server
Create the connection to the LDAP server
def connect_to_ldap(self):
        self.logger.debug("Connecting to LDAP server")
        try:
            self.ldap_connector.simple_bind_s(self.ldap_username,
                                              self.ldap_password)
        except ldap.INVALID_CREDENTIALS as e:
            self.logger.critical(
                "LDAP: Your username or password is incorrect: " + str(e)
            )
            return False
        except ldap.SERVER_DOWN as e:
            self.logger.critical(
                "LDAP: The server appears to be down: " + str(e))
            return False
        except Exception as e:
            self.logger.critical(str(e))
            return False
        self.logger.debug("Connection successful")
        return True
def connect_to_ldap ( self ) : self . logger . debug ( "Connecting to LDAP server" ) try : self . ldap_connector . simple_bind_s ( self . ldap_username , self . ldap_password ) except ldap . INVALID_CREDENTIALS as e : self . logger . critical ( "LDAP: Your username or password is incorrect: " + str ( e ) ) return False except ldap . SERVER_DOWN as e : self . logger . critical ( "LDAP: The server appears to be down: " + str ( e ) ) return False except Exception as e : self . logger . critical ( str ( e ) ) return False self . logger . debug ( "Connection successful" ) return True
Create the connection to the LDAP server
Create the connection to the LDAP server
"""
        Create the connection to the LDAP server
        """
self