LDAPObject.read_s() now returns None instead of raising ldap.NO_SUCH_OBJECT in case the search operation returned emtpy result.

This commit is contained in:
stroeder
2015-08-08 13:37:41 +00:00
parent b4410cec3d
commit 983bf24d35
2 changed files with 5 additions and 3 deletions

View File

@@ -4,6 +4,8 @@ Released 2.4.21 2015-07-xx
Changes since 2.4.20:
Lib/
* LDAPObject.read_s() now returns None instead of raising
ldap.NO_SUCH_OBJECT in case the search operation returned emtpy result.
----------------------------------------------------------------
Released 2.4.20 2015-07-07
@@ -1185,4 +1187,4 @@ Released 2.0.0pre02 2002-02-01
----------------------------------------------------------------
Released 1.10alpha3 2000-09-19
$Id: CHANGES,v 1.351 2015/08/08 13:36:30 stroeder Exp $
$Id: CHANGES,v 1.352 2015/08/08 13:37:41 stroeder Exp $

View File

@@ -3,7 +3,7 @@ ldapobject.py - wraps class _ldap.LDAPObject
See http://www.python-ldap.org/ for details.
\$Id: ldapobject.py,v 1.146 2015/06/11 15:13:43 stroeder Exp $
\$Id: ldapobject.py,v 1.147 2015/08/08 13:37:41 stroeder Exp $
Compability:
- Tested with Python 2.0+ but should work with Python 1.5.x
@@ -695,7 +695,7 @@ class SimpleLDAPObject:
if r:
return r[0][1]
else:
raise ldap.NO_SUCH_OBJECT('Empty search result reading entry %s' % (repr(dn)))
return None
def read_subschemasubentry_s(self,subschemasubentry_dn,attrs=None):
"""