def __init__(self, url=None, lp=None, modules_dir=None, session_info=None, credentials=None, flags=0, options=None): """Opens the SAM Database For parameter meanings see the super class (samba.Ldb) """ self.lp = lp if url is None: url = lp.get("sam database") super(SamDB, self).__init__(url=url, lp=lp, modules_dir=modules_dir, session_info=session_info, credentials=credentials, flags=flags, options=options) glue.dsdb_set_global_schema(self)
def __init__(self, url=None, session_info=None, credentials=None, modules_dir=None, lp=None): """Open the Sam Database. :param url: URL of the database. """ self.lp = lp super(SamDB, self).__init__(session_info=session_info, credentials=credentials, modules_dir=modules_dir, lp=lp) glue.dsdb_set_global_schema(self) if url: self.connect(url) else: self.connect(lp.get("sam database"))