Skip to content

Commit

Permalink
fixed method calls in ReconnectLDAPObject
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Apr 24, 2017
1 parent 4341dac commit 0b580e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Lib/
* faster implementation of ldap.schema.tokenizer.split_tokens()
(thanks to Christian Heimes)
* removed unused 2nd argument of ldap.schema.tokenizer.split_tokens()
* fixed method calls in ReconnectLDAPObject (thanks to Philipp Hahn)

Tests/
* re-factored t_ldap_schema_tokenizer.py
Expand Down Expand Up @@ -1347,4 +1348,4 @@ Released 2.0.0pre02 2002-02-01
----------------------------------------------------------------
Released 1.10alpha3 2000-09-19

$Id: CHANGES,v 1.412 2017/02/20 10:25:47 stroeder Exp $
$Id: CHANGES,v 1.413 2017/04/24 08:25:16 stroeder Exp $
15 changes: 8 additions & 7 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.158 2016/11/18 07:01:45 stroeder Exp $
\$Id: ldapobject.py,v 1.159 2017/04/24 08:25:16 stroeder Exp $
Compability:
- Tested with Python 2.0+ but should work with Python 1.5.x
Expand Down Expand Up @@ -206,8 +206,7 @@ def add(self,dn,modlist):
return self.add_ext(dn,modlist,None,None)

def add_s(self,dn,modlist):
msgid = self.add(dn,modlist)
return self.result(msgid,all=1,timeout=self.timeout)
return self.add_ext_s(dn,modlist,None,None)

def simple_bind(self,who='',cred='',serverctrls=None,clientctrls=None):
"""
Expand Down Expand Up @@ -398,8 +397,7 @@ def modify(self,dn,modlist):
return self.modify_ext(dn,modlist,None,None)

def modify_s(self,dn,modlist):
msgid = self.modify(dn,modlist)
return self.result(msgid,all=1,timeout=self.timeout)
return self.modify_ext_s(dn,modlist,None,None)

def modrdn(self,dn,newrdn,delold=1):
"""
Expand Down Expand Up @@ -880,6 +878,9 @@ def _restore_options(self):
for k,v in self._options:
SimpleLDAPObject.set_option(self,k,v)

def passwd_s(self,*args,**kwargs):
return self._apply_method_s(SimpleLDAPObject.passwd_s,*args,**kwargs)

def reconnect(self,uri,retry_max=1,retry_delay=60.0):
# Drop and clean up old connection completely
# Reconnect
Expand Down Expand Up @@ -974,8 +975,8 @@ def add_ext_s(self,*args,**kwargs):
def cancel_s(self,*args,**kwargs):
return self._apply_method_s(SimpleLDAPObject.cancel_s,*args,**kwargs)

def compare_s(self,*args,**kwargs):
return self._apply_method_s(SimpleLDAPObject.compare_s,*args,**kwargs)
def compare_ext_s(self,*args,**kwargs):
return self._apply_method_s(SimpleLDAPObject.compare_ext_s,*args,**kwargs)

def delete_ext_s(self,*args,**kwargs):
return self._apply_method_s(SimpleLDAPObject.delete_ext_s,*args,**kwargs)
Expand Down

0 comments on commit 0b580e8

Please sign in to comment.