def __init__(self): try: self.handler = LDAPDAO() self.schema_loaded = False except ldap.INVALID_CREDENTIALS: raise TargetInvalidCredentials('LDAP invalid credentials') except ldap.SERVER_DOWN: raise TargetConnectionError("LDAP server is down")