Skip to content

Commit

Permalink
SF#64: Fixed missing ReconnectLDAPObject._reconnect_lock when pickling
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Nov 23, 2014
1 parent 5a68a89 commit 172da4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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.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
Expand Down Expand Up @@ -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 $
4 changes: 3 additions & 1 deletion 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.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
Expand Down Expand Up @@ -751,6 +751,7 @@ class ReconnectLDAPObject(SimpleLDAPObject):
'_l':None,
'_ldap_object_lock':None,
'_trace_file':None,
'_reconnect_lock':None,
}

def __init__(
Expand Down Expand Up @@ -789,6 +790,7 @@ def __setstate__(self,d):
"""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)

Expand Down

0 comments on commit 172da4d

Please sign in to comment.