summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/provisionbackend.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-03-01 04:46:40 +0100
committerJelmer Vernooij <jelmer@samba.org>2010-03-01 04:46:51 +0100
commit31a718aa27bcf3f56347a109f6d0bb553814c052 (patch)
tree3c4d5dba41a7811a52c0ff889bfeaf9786644abb /source4/scripting/python/samba/provisionbackend.py
parent1ef50d5de4e1341703a35200e4c90ec4fba0ce89 (diff)
downloadsamba-31a718aa27bcf3f56347a109f6d0bb553814c052.tar.gz
samba-31a718aa27bcf3f56347a109f6d0bb553814c052.tar.xz
samba-31a718aa27bcf3f56347a109f6d0bb553814c052.zip
General cleanups of python code, hinted by pyflakes.
Diffstat (limited to 'source4/scripting/python/samba/provisionbackend.py')
-rw-r--r--source4/scripting/python/samba/provisionbackend.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/scripting/python/samba/provisionbackend.py b/source4/scripting/python/samba/provisionbackend.py
index 3dff6eded4..649113e6a2 100644
--- a/source4/scripting/python/samba/provisionbackend.py
+++ b/source4/scripting/python/samba/provisionbackend.py
@@ -169,8 +169,8 @@ class LDAPBackend(ProvisionBackend):
# if another instance of slapd is already running
try:
ldapi_db = Ldb(self.ldapi_uri)
- search_ol_rootdse = ldapi_db.search(base="", scope=SCOPE_BASE,
- expression="(objectClass=OpenLDAProotDSE)");
+ ldapi_db.search(base="", scope=SCOPE_BASE,
+ expression="(objectClass=OpenLDAProotDSE)");
try:
f = open(self.paths.slapdpid, "r")
p = f.read()
@@ -181,7 +181,7 @@ class LDAPBackend(ProvisionBackend):
raise ProvisioningError("Warning: Another slapd Instance seems already running on this host, listening to " + self.ldapi_uri + ". Please shut it down before you continue. ")
- except LdbError, e:
+ except LdbError:
pass
# Try to print helpful messages when the user has not specified the path to slapd
@@ -237,11 +237,11 @@ class LDAPBackend(ProvisionBackend):
# Wait until the socket appears
try:
ldapi_db = Ldb(self.ldapi_uri, lp=self.lp, credentials=self.credentials)
- search_ol_rootdse = ldapi_db.search(base="", scope=SCOPE_BASE,
+ ldapi_db.search(base="", scope=SCOPE_BASE,
expression="(objectClass=OpenLDAProotDSE)")
# If we have got here, then we must have a valid connection to the LDAP server!
return
- except LdbError, e:
+ except LdbError:
time.sleep(1)
pass
@@ -621,7 +621,7 @@ class FDSBackend(LDAPBackend):
lnkattr = self.schema.linked_attributes()
- refint_config = data = open(self.setup_path("fedorads-refint-delete.ldif"), 'r').read()
+ refint_config = open(self.setup_path("fedorads-refint-delete.ldif"), 'r').read()
memberof_config = ""
index_config = ""
argnum = 3