@@ -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 bytes_strictness = None ,
9898 ):
@@ -769,13 +769,13 @@ def result4(self,msgid=ldap.RES_ANY,all=1,timeout=None,add_ctrls=0,add_intermedi
769769 resp_data = self ._bytesify_results (resp_data , with_ctrls = add_ctrls )
770770 return resp_type , resp_data , resp_msgid , decoded_resp_ctrls , resp_name , resp_value
771771
772- def search_ext (self ,base ,scope ,filterstr = None ,attrlist = None ,attrsonly = 0 ,serverctrls = None ,clientctrls = None ,timeout = - 1 ,sizelimit = 0 ):
772+ def search_ext (self ,base = None ,scope = ldap . SCOPE_SUBTREE ,filterstr = None ,attrlist = None ,attrsonly = 0 ,serverctrls = None ,clientctrls = None ,timeout = - 1 ,sizelimit = 0 ):
773773 """
774- search(base, scope [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0]]]) -> int
775- search_s(base, scope [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0]]])
776- search_st(base, scope [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0 [,timeout=-1]]]])
777- search_ext(base, scope, [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0 [,serverctrls=None [,clientctrls=None [,timeout=-1 [,sizelimit=0]]]]]]])
778- search_ext_s(base, scope, [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0 [,serverctrls=None [,clientctrls=None [,timeout=-1 [,sizelimit=0]]]]]]])
774+ search([ base=None, [ scope=ldap.SCOPE_SUBTREE, [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0]] ]]]) -> int
775+ search_s([ base=None, [ scope=ldap.SCOPE_SUBTREE, [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0]] ]]])
776+ search_st([ base=None, [ scope=ldap.SCOPE_SUBTREE, [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0 [,timeout=-1]] ]]]])
777+ search_ext([ base=None, [ scope=ldap.SCOPE_SUBTREE, [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0 [,serverctrls=None [,clientctrls=None [,timeout=-1 [,sizelimit=0]] ]]]]]]])
778+ search_ext_s([ base=None, [ scope=ldap.SCOPE_SUBTREE, [,filterstr='(objectClass=*)' [,attrlist=None [,attrsonly=0 [,serverctrls=None [,clientctrls=None [,timeout=-1 [,sizelimit=0]] ]]]]]]])
779779
780780 Perform an LDAP search operation, with base as the DN of
781781 the entry at which to start the search, scope being one of
@@ -841,17 +841,17 @@ def search_ext(self,base,scope,filterstr=None,attrlist=None,attrsonly=0,serverct
841841 timeout ,sizelimit ,
842842 )
843843
844- def search_ext_s (self ,base ,scope ,filterstr = None ,attrlist = None ,attrsonly = 0 ,serverctrls = None ,clientctrls = None ,timeout = - 1 ,sizelimit = 0 ):
844+ 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 ):
845845 msgid = self .search_ext (base ,scope ,filterstr ,attrlist ,attrsonly ,serverctrls ,clientctrls ,timeout ,sizelimit )
846846 return self .result (msgid ,all = 1 ,timeout = timeout )[1 ]
847847
848- def search (self ,base ,scope ,filterstr = None ,attrlist = None ,attrsonly = 0 ):
848+ def search (self ,base = None ,scope = ldap . SCOPE_SUBTREE ,filterstr = None ,attrlist = None ,attrsonly = 0 ):
849849 return self .search_ext (base ,scope ,filterstr ,attrlist ,attrsonly ,None ,None )
850850
851- def search_s (self ,base ,scope ,filterstr = None ,attrlist = None ,attrsonly = 0 ):
851+ def search_s (self ,base = None ,scope = ldap . SCOPE_SUBTREE ,filterstr = None ,attrlist = None ,attrsonly = 0 ):
852852 return self .search_ext_s (base ,scope ,filterstr ,attrlist ,attrsonly ,None ,None ,timeout = self .timeout )
853853
854- def search_st (self ,base ,scope ,filterstr = None ,attrlist = None ,attrsonly = 0 ,timeout = - 1 ):
854+ def search_st (self ,base = None ,scope = ldap . SCOPE_SUBTREE ,filterstr = None ,attrlist = None ,attrsonly = 0 ,timeout = - 1 ):
855855 return self .search_ext_s (base ,scope ,filterstr ,attrlist ,attrsonly ,None ,None ,timeout )
856856
857857 def start_tls_s (self ):
@@ -962,7 +962,7 @@ def search_subschemasubentry_s(self,dn=None):
962962 except IndexError :
963963 return None
964964
965- def read_s (self ,dn ,filterstr = None ,attrlist = None ,serverctrls = None ,clientctrls = None ,timeout = - 1 ):
965+ def read_s (self ,dn = None ,filterstr = None ,attrlist = None ,serverctrls = None ,clientctrls = None ,timeout = - 1 ):
966966 """
967967 Reads and returns a single entry specified by `dn'.
968968
@@ -1005,7 +1005,7 @@ def read_subschemasubentry_s(self,subschemasubentry_dn,attrs=None):
10051005 else :
10061006 return subschemasubentry
10071007
1008- def find_unique_entry (self ,base ,scope = ldap .SCOPE_SUBTREE ,filterstr = None ,attrlist = None ,attrsonly = 0 ,serverctrls = None ,clientctrls = None ,timeout = - 1 ):
1008+ def find_unique_entry (self ,base = None ,scope = ldap .SCOPE_SUBTREE ,filterstr = None ,attrlist = None ,attrsonly = 0 ,serverctrls = None ,clientctrls = None ,timeout = - 1 ):
10091009 """
10101010 Returns a unique entry, raises exception if not unique
10111011 """
@@ -1077,7 +1077,7 @@ class ReconnectLDAPObject(SimpleLDAPObject):
10771077 }
10781078
10791079 def __init__ (
1080- self ,uri ,
1080+ self ,uri = None ,
10811081 trace_level = 0 ,trace_file = None ,trace_stack_limit = 5 ,bytes_mode = None ,
10821082 bytes_strictness = None , retry_max = 1 , retry_delay = 60.0
10831083 ):
0 commit comments