Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- functions.py 2010-04-16 17:35:36.000000000 -0300
- +++ functions2.py 2010-04-17 10:39:57.000000000 -0300
- @@ -85,7 +85,7 @@
- return LDAPObject(uri,trace_level,trace_file,trace_stack_limit)
- -def open(host,port=389,trace_level=0,trace_file=sys.stdout,trace_stack_limit=None):
- +def open(host,port=389,trace_level=0,trace_file=sys.stdout,trace_stack_limit=None,ssl=False):
- """
- Return LDAPObject instance by opening LDAP connection to
- specified LDAP host
- @@ -101,7 +101,8 @@
- File object where to write the trace output to.
- Default is to use stdout.
- """
- - return initialize('ldap://%s:%d' % (host,port),trace_level,trace_file,trace_stack_limit)
- + scheme = ssl and 'ldaps://' or 'ldap://'
- + return initialize('%s%s:%d' % (scheme,host,port),trace_level,trace_file,trace_stack_limit)
- init = open
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement