Skip to content

Commit

Permalink
Fixed raising exception in LDAPObject.read_s() when reading an entry …
Browse files Browse the repository at this point in the history
…returns empty search result
  • Loading branch information
stroeder committed Oct 8, 2014
1 parent 64cca81 commit 2983bff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -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/
*
Expand Down Expand Up @@ -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 $
4 changes: 2 additions & 2 deletions Lib/ldap/ldapobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
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
Expand Down Expand Up @@ -663,7 +663,7 @@ def read_s(self,dn,filterstr=None,attrlist=None,serverctrls=None,clientctrls=Non
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):
"""
Expand Down

0 comments on commit 2983bff

Please sign in to comment.