From 5cdd30011c5b09fd9aac669047e0c2f60f558feb Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Mon, 18 Jan 2010 21:01:08 -0600 Subject: s4-provision: Fixed typos and redundant code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Dieter Wallnöfer --- source4/scripting/python/samba/provisionbackend.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source4/scripting') diff --git a/source4/scripting/python/samba/provisionbackend.py b/source4/scripting/python/samba/provisionbackend.py index ae58a16317..8241ed69ff 100644 --- a/source4/scripting/python/samba/provisionbackend.py +++ b/source4/scripting/python/samba/provisionbackend.py @@ -704,7 +704,7 @@ class FDSBackend(LDAPBackend): os.path.join(self.paths.ldapdir, "slapd-samba4", "ldif2db"), "-s", self.sambadn, "-i", self.samba_ldif], close_fds=True, shell=False) if retcode != 0: - raise("ldif2db failed") + raise ProvisioningError("ldif2db failed") def post_setup(self): ldapi_db = Ldb(self.ldapi_uri, credentials=self.credentials) @@ -717,16 +717,16 @@ class FDSBackend(LDAPBackend): dn = str(res[i]["dn"]) ldapi_db.delete(dn) - aci = """(targetattr = "*") (version 3.0;acl "full access to all by samba-admin";allow (all)(userdn = "ldap:///CN=samba-admin,%s");)""" % self.sambadn + aci = """(targetattr = "*") (version 3.0;acl "full access to all by samba-admin";allow (all)(userdn = "ldap:///CN=samba-admin,%s");)""" % self.sambadn - m = ldb.Message() - m["aci"] = ldb.MessageElement([aci], ldb.FLAG_MOD_REPLACE, "aci") + m = ldb.Message() + m["aci"] = ldb.MessageElement([aci], ldb.FLAG_MOD_REPLACE, "aci") - m.dn = ldb.Dn(1, self.names.domaindn) - ldapi_db.modify(m) + m.dn = ldb.Dn(ldapi_db, self.names.domaindn) + ldapi_db.modify(m) - m.dn = ldb.Dn(1, self.names.configdn) - ldapi_db.modify(m) + m.dn = ldb.Dn(ldapi_db, self.names.configdn) + ldapi_db.modify(m) - m.dn = ldb.Dn(1, self.names.schemadn) - ldapi_db.modify(m) + m.dn = ldb.Dn(ldapi_db, self.names.schemadn) + ldapi_db.modify(m) -- cgit