SF#64: Fixed missing ReconnectLDAPObject._reconnect_lock when pickling

This commit is contained in:
stroeder
2014-11-23 18:51:53 +00:00
parent 5a68a893a0
commit 172da4def4
2 changed files with 6 additions and 3 deletions

View File

@@ -4,7 +4,8 @@ Released 2.4.19 2014-xx-xx
Changes since 2.4.18:
Lib/
*
* Fixed missing ReconnectLDAPObject._reconnect_lock when pickling
(see SF#64, thanks to Dan O'Reilly)
----------------------------------------------------------------
Released 2.4.18 2014-10-09
@@ -1140,4 +1141,4 @@ Released 2.0.0pre02 2002-02-01
----------------------------------------------------------------
Released 1.10alpha3 2000-09-19
$Id: CHANGES,v 1.333 2014/11/23 18:49:13 stroeder Exp $
$Id: CHANGES,v 1.334 2014/11/23 18:51:53 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.142 2014/10/08 17:27:06 stroeder Exp $
\$Id: ldapobject.py,v 1.143 2014/11/23 18:51:53 stroeder Exp $
Compability:
- Tested with Python 2.0+ but should work with Python 1.5.x
@@ -751,6 +751,7 @@ class ReconnectLDAPObject(SimpleLDAPObject):
'_l':None,
'_ldap_object_lock':None,
'_trace_file':None,
'_reconnect_lock':None,
}
def __init__(
@@ -789,6 +790,7 @@ class ReconnectLDAPObject(SimpleLDAPObject):
"""set up the object from pickled data"""
self.__dict__.update(d)
self._ldap_object_lock = self._ldap_lock()
self._reconnect_lock = ldap.LDAPLock(desc='reconnect lock within %s' % (repr(self)))
self._trace_file = sys.stdout
self.reconnect(self._uri)