Fixed raising exception in LDAPObject.read_s() when reading an entry returns empty search result
This commit is contained in:
5
CHANGES
5
CHANGES
@@ -4,7 +4,8 @@ Released 2.4.18 2014-xx-xx
|
||||
Changes since 2.4.17:
|
||||
|
||||
Lib/
|
||||
*
|
||||
* Fixed raising exception in LDAPObject.read_s() when reading
|
||||
an entry returns empty search result
|
||||
|
||||
Modules/
|
||||
*
|
||||
@@ -1134,4 +1135,4 @@ Released 2.0.0pre02 2002-02-01
|
||||
----------------------------------------------------------------
|
||||
Released 1.10alpha3 2000-09-19
|
||||
|
||||
$Id: CHANGES,v 1.330 2014/10/08 17:16:04 stroeder Exp $
|
||||
$Id: CHANGES,v 1.331 2014/10/08 17:27:06 stroeder Exp $
|
||||
|
||||
@@ -3,7 +3,7 @@ ldapobject.py - wraps class _ldap.LDAPObject
|
||||
|
||||
See http://www.python-ldap.org/ for details.
|
||||
|
||||
\$Id: ldapobject.py,v 1.141 2014/09/09 10:14:47 stroeder Exp $
|
||||
\$Id: ldapobject.py,v 1.142 2014/10/08 17:27:06 stroeder Exp $
|
||||
|
||||
Compability:
|
||||
- Tested with Python 2.0+ but should work with Python 1.5.x
|
||||
@@ -663,7 +663,7 @@ class SimpleLDAPObject:
|
||||
if r:
|
||||
return r[0][1]
|
||||
else:
|
||||
return ldap.NO_SUCH_OBJECT('Empty search result reading %s' % (repr(dn)))
|
||||
raise ldap.NO_SUCH_OBJECT('Empty search result reading entry %s' % (repr(dn)))
|
||||
|
||||
def read_subschemasubentry_s(self,subschemasubentry_dn,attrs=None):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user