ldappr/ldappr/api.py

9 lines
253 B
Python
Raw Normal View History

2014-09-14 17:24:19 +04:00
from connection import Connection, AuthConnection
def connect_to(server, *args, **kwargs):
if args or 'bind_dn' and 'password' in kwargs:
#if args:
return AuthConnection(server, *args, **kwargs)
return Connection(server, **kwargs)