@@ -92,7 +92,7 @@ class SimpleLDAPObject:
9292 }
9393
9494 def __init__ (
95- self ,uri ,
95+ self ,uri = None ,
9696 trace_level = 0 ,trace_file = None ,trace_stack_limit = 5 ,bytes_mode = None
9797 ):
9898 self ._trace_level = trace_level
@@ -748,13 +748,13 @@ def result4(self,msgid=ldap.RES_ANY,all=1,timeout=None,add_ctrls=0,add_intermedi
748748 resp_data = self ._bytesify_results (resp_data , with_ctrls = add_ctrls )
749749 return resp_type , resp_data , resp_msgid , decoded_resp_ctrls , resp_name , resp_value
750750
751- def search_ext (self ,base ,scope ,filterstr = None ,attrlist = None ,attrsonly = 0 ,serverctrls = None ,clientctrls = None ,timeout = - 1 ,sizelimit = 0 ):
751+ def search_ext (self ,base = None ,scope = ldap . SCOPE_SUBTREE ,filterstr = None ,attrlist = None ,attrsonly = 0 ,serverctrls = None ,clientctrls = None ,timeout = - 1 ,sizelimit = 0 ):
752752 """
753- search(base, scope [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0]]]) -> int
754- search_s(base, scope [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0]]])
755- search_st(base, scope [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0 [,timeout=-1]]]])
756- search_ext(base, scope, [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0 [,serverctrls=None [,clientctrls=None [,timeout=-1 [,sizelimit=0]]]]]]])
757- search_ext_s(base, scope, [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0 [,serverctrls=None [,clientctrls=None [,timeout=-1 [,sizelimit=0]]]]]]])
753+ search([ base=None, [ scope=ldap.SCOPE_SUBTREE, [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0]] ]]]) -> int
754+ search_s([ base=None, [ scope=ldap.SCOPE_SUBTREE, [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0]] ]]])
755+ search_st([ base=None, [ scope=ldap.SCOPE_SUBTREE, [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0 [,timeout=-1]] ]]]])
756+ search_ext([ base=None, [ scope=ldap.SCOPE_SUBTREE, [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0 [,serverctrls=None [,clientctrls=None [,timeout=-1 [,sizelimit=0]] ]]]]]]])
757+ search_ext_s([ base=None, [ scope=ldap.SCOPE_SUBTREE, [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0 [,serverctrls=None [,clientctrls=None [,timeout=-1 [,sizelimit=0]] ]]]]]]])
758758
759759 Perform an LDAP search operation, with base as the DN of
760760 the entry at which to start the search, scope being one of
@@ -820,17 +820,17 @@ def search_ext(self,base,scope,filterstr=None,attrlist=None,attrsonly=0,serverct
820820 timeout ,sizelimit ,
821821 )
822822
823- def search_ext_s (self ,base ,scope ,filterstr = None ,attrlist = None ,attrsonly = 0 ,serverctrls = None ,clientctrls = None ,timeout = - 1 ,sizelimit = 0 ):
823+ def search_ext_s (self ,base = None ,scope = ldap . SCOPE_SUBTREE ,filterstr = None ,attrlist = None ,attrsonly = 0 ,serverctrls = None ,clientctrls = None ,timeout = - 1 ,sizelimit = 0 ):
824824 msgid = self .search_ext (base ,scope ,filterstr ,attrlist ,attrsonly ,serverctrls ,clientctrls ,timeout ,sizelimit )
825825 return self .result (msgid ,all = 1 ,timeout = timeout )[1 ]
826826
827- def search (self ,base ,scope ,filterstr = None ,attrlist = None ,attrsonly = 0 ):
827+ def search (self ,base = None ,scope = ldap . SCOPE_SUBTREE ,filterstr = None ,attrlist = None ,attrsonly = 0 ):
828828 return self .search_ext (base ,scope ,filterstr ,attrlist ,attrsonly ,None ,None )
829829
830- def search_s (self ,base ,scope ,filterstr = None ,attrlist = None ,attrsonly = 0 ):
830+ def search_s (self ,base = None ,scope = ldap . SCOPE_SUBTREE ,filterstr = None ,attrlist = None ,attrsonly = 0 ):
831831 return self .search_ext_s (base ,scope ,filterstr ,attrlist ,attrsonly ,None ,None ,timeout = self .timeout )
832832
833- def search_st (self ,base ,scope ,filterstr = None ,attrlist = None ,attrsonly = 0 ,timeout = - 1 ):
833+ def search_st (self ,base = None ,scope = ldap . SCOPE_SUBTREE ,filterstr = None ,attrlist = None ,attrsonly = 0 ,timeout = - 1 ):
834834 return self .search_ext_s (base ,scope ,filterstr ,attrlist ,attrsonly ,None ,None ,timeout )
835835
836836 def start_tls_s (self ):
@@ -941,7 +941,7 @@ def search_subschemasubentry_s(self,dn=None):
941941 except IndexError :
942942 return None
943943
944- def read_s (self ,dn ,filterstr = None ,attrlist = None ,serverctrls = None ,clientctrls = None ,timeout = - 1 ):
944+ def read_s (self ,dn = None ,filterstr = None ,attrlist = None ,serverctrls = None ,clientctrls = None ,timeout = - 1 ):
945945 """
946946 Reads and returns a single entry specified by `dn'.
947947
@@ -984,7 +984,7 @@ def read_subschemasubentry_s(self,subschemasubentry_dn,attrs=None):
984984 else :
985985 return subschemasubentry
986986
987- def find_unique_entry (self ,base ,scope = ldap .SCOPE_SUBTREE ,filterstr = None ,attrlist = None ,attrsonly = 0 ,serverctrls = None ,clientctrls = None ,timeout = - 1 ):
987+ def find_unique_entry (self ,base = None ,scope = ldap .SCOPE_SUBTREE ,filterstr = None ,attrlist = None ,attrsonly = 0 ,serverctrls = None ,clientctrls = None ,timeout = - 1 ):
988988 """
989989 Returns a unique entry, raises exception if not unique
990990 """
@@ -1056,7 +1056,7 @@ class ReconnectLDAPObject(SimpleLDAPObject):
10561056 }
10571057
10581058 def __init__ (
1059- self ,uri ,
1059+ self ,uri = None ,
10601060 trace_level = 0 ,trace_file = None ,trace_stack_limit = 5 ,bytes_mode = None ,
10611061 retry_max = 1 ,retry_delay = 60.0
10621062 ):
0 commit comments