Skip to content

Commit 1800cf6

Browse files
author
stroeder
committed
fixed errno-related regression introduced in 2.4.35
1 parent 44304ca commit 1800cf6

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

CHANGES

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ Released 2.4.37 2017-05-xx
44
Changes since 2.4.36:
55

66
Lib/
7+
* fixed errno-related regression introduced in 2.4.35
78

89
Tests/
910
* added more checks to t_cext.py
1011
* renamed t_search.py to t_ldapobject.py and code-cleaning
12+
* added test for errno-related regression to t_ldapobject.py
1113

1214
----------------------------------------------------------------
1315
Released 2.4.36 2017-04-26
@@ -1407,4 +1409,4 @@ Released 2.0.0pre02 2002-02-01
14071409
----------------------------------------------------------------
14081410
Released 1.10alpha3 2000-09-19
14091411

1410-
$Id: CHANGES,v 1.433 2017/04/27 08:27:33 stroeder Exp $
1412+
$Id: CHANGES,v 1.434 2017/04/27 08:40:10 stroeder Exp $

Lib/ldap/ldapobject.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
See http://www.python-ldap.org/ for details.
55
6-
\$Id: ldapobject.py,v 1.161 2017/04/25 17:50:33 stroeder Exp $
6+
\$Id: ldapobject.py,v 1.162 2017/04/27 08:40:10 stroeder Exp $
77
88
Compability:
99
- Tested with Python 2.0+ but should work with Python 1.5.x
@@ -111,13 +111,8 @@ def _ldap_call(self,func,*args,**kwargs):
111111
diagnostic_message_success = self._l.get_option(ldap.OPT_DIAGNOSTIC_MESSAGE)
112112
finally:
113113
self._ldap_object_lock.release()
114-
except LDAPError,e:
115-
if 'info' not in e.args[0]:
116-
try:
117-
errno = e.args[0]['errno']
118-
except KeyError:
119-
pass
120-
else:
114+
except LDAPError, e:
115+
if not e.args[0].has_key('info') and e.args[0].has_key('errno'):
121116
e.args[0]['info'] = strerror(e.args[0]['errno'])
122117
if __debug__ and self._trace_level>=2:
123118
self._trace_file.write('=> LDAPError - %s: %s\n' % (e.__class__.__name__,str(e)))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy