problem with sasl_bind_s in ReconnectLDAPObject
Allan Streib
astreib at indiana.edu
Tue Feb 11 19:53:06 CET 2003
In python-ldap-2.0.0pre06, attempting to use sasl_bind_s in the a
ReconnectLDAPObject, I received the following error:
AttributeError: ReconnectLDAPObject has no attribute '_store_last_bind'
I have found that the following change seems to result in the correct
functionality. There may be a more elegant solution....
--- ldapobject.py.orig Tue Feb 11 13:34:46 2003
+++ ldapobject.py Tue Feb 11 11:25:38 2003
@@ -672,7 +672,10 @@
def _apply_last_bind(self):
if self._last_bind!=None:
func,args,kwargs = self._last_bind
- apply(func,args,kwargs)
+ if kwargs:
+ apply(func,args,kwargs)
+ else:
+ apply(func,args)
def _restore_options(self):
"""Restore all recorded options"""
@@ -741,7 +744,7 @@
"""
sasl_bind_s(who, auth) -> None
"""
- self._store_last_bind(self.sasl_bind_s,who,auth)
+ self._last_bind = (self.sasl_bind_s,(who,auth),{})
return self._ldap_call(self._l.sasl_bind_s,who,auth)
def add_s(self,*args,**kwargs):
More information about the python-ldap
mailing list