Changeset 1506 for pykota/trunk

Show
Ignore:
Timestamp:
05/27/04 14:52:12 (21 years ago)
Author:
jalet
Message:

More useful error message in case of misconfiguration of an LDAP search base
in pykota.conf

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/ldapstorage.py

    r1502 r1506  
    2222# 
    2323# $Log$ 
     24# Revision 1.65  2004/05/27 12:52:12  jalet 
     25# More useful error message in case of misconfiguration of an LDAP  search base 
     26# in pykota.conf 
     27# 
    2428# Revision 1.64  2004/05/26 14:50:01  jalet 
    2529# First try at saving the job-originating-hostname in the database 
     
    334338                self.tool.logdebug("QUERY : Filter : %s, BaseDN : %s, Scope : %s, Attributes : %s" % (key, base, scope, fields)) 
    335339                result = self.database.search_s(base, scope, key, fields) 
     340        except ldap.NO_SUCH_OBJECT, msg :         
     341            raise PyKotaStorageError, (_("Search base %s doesn't seem to exist. Probable misconfiguration. Please double check /etc/pykota/pykota.conf : %s") % (base, msg)) 
    336342        except ldap.LDAPError, msg :     
    337343            raise PyKotaStorageError, (_("Search for %s(%s) from %s(scope=%s) returned no answer.") % (key, fields, base, scope)) + " : %s" % str(msg)