Skip to content

Commit

Permalink
fixed errno-related regression introduced in 2.4.35
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Apr 27, 2017
1 parent 44304ca commit 1800cf6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 3 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ Released 2.4.37 2017-05-xx
Changes since 2.4.36:

Lib/
* fixed errno-related regression introduced in 2.4.35

Tests/
* added more checks to t_cext.py
* renamed t_search.py to t_ldapobject.py and code-cleaning
* added test for errno-related regression to t_ldapobject.py

----------------------------------------------------------------
Released 2.4.36 2017-04-26
Expand Down Expand Up @@ -1407,4 +1409,4 @@ Released 2.0.0pre02 2002-02-01
----------------------------------------------------------------
Released 1.10alpha3 2000-09-19

$Id: CHANGES,v 1.433 2017/04/27 08:27:33 stroeder Exp $
$Id: CHANGES,v 1.434 2017/04/27 08:40:10 stroeder Exp $
11 changes: 3 additions & 8 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.161 2017/04/25 17:50:33 stroeder Exp $
\$Id: ldapobject.py,v 1.162 2017/04/27 08:40:10 stroeder Exp $
Compability:
- Tested with Python 2.0+ but should work with Python 1.5.x
Expand Down Expand Up @@ -111,13 +111,8 @@ def _ldap_call(self,func,*args,**kwargs):
diagnostic_message_success = self._l.get_option(ldap.OPT_DIAGNOSTIC_MESSAGE)
finally:
self._ldap_object_lock.release()
except LDAPError,e:
if 'info' not in e.args[0]:
try:
errno = e.args[0]['errno']
except KeyError:
pass
else:
except LDAPError, e:
if not e.args[0].has_key('info') and e.args[0].has_key('errno'):
e.args[0]['info'] = strerror(e.args[0]['errno'])
if __debug__ and self._trace_level>=2:
self._trace_file.write('=> LDAPError - %s: %s\n' % (e.__class__.__name__,str(e)))
Expand Down

0 comments on commit 1800cf6

Please sign in to comment.