summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/scripting/python/samba/__init__.py2
-rw-r--r--source4/scripting/python/samba/samdb.py10
-rw-r--r--source4/scripting/python/samba/tests/__init__.py4
-rw-r--r--source4/scripting/python/samba/tests/provision.py2
4 files changed, 9 insertions, 9 deletions
diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py
index e9fc26af20..a49e6e1ead 100644
--- a/source4/scripting/python/samba/__init__.py
+++ b/source4/scripting/python/samba/__init__.py
@@ -223,7 +223,7 @@ def check_all_substituted(text):
:param text: The text to search for substitution variables
"""
if not "${" in text:
- return
+ return
var_start = text.find("${")
var_end = text.find("}", var_start)
diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py
index 9cc55e5629..614970d3ec 100644
--- a/source4/scripting/python/samba/samdb.py
+++ b/source4/scripting/python/samba/samdb.py
@@ -201,11 +201,11 @@ userAccountControl: %u
glue.dsdb_attach_schema_from_ldif_file(self, pf, df)
def set_invocation_id(self, invocation_id):
- """Set the invocation id for this SamDB handle.
-
- :param invocation_id: GUID of the invocation id.
- """
- glue.dsdb_set_ntds_invocation_id(self, invocation_id)
+ """Set the invocation id for this SamDB handle.
+
+ :param invocation_id: GUID of the invocation id.
+ """
+ glue.dsdb_set_ntds_invocation_id(self, invocation_id)
def setexpiry(self, user, expiry_seconds, noexpiry):
"""Set the password expiry for a user
diff --git a/source4/scripting/python/samba/tests/__init__.py b/source4/scripting/python/samba/tests/__init__.py
index d827bfa004..b342b93c49 100644
--- a/source4/scripting/python/samba/tests/__init__.py
+++ b/source4/scripting/python/samba/tests/__init__.py
@@ -70,8 +70,8 @@ class SubstituteVarTestCase(unittest.TestCase):
samba.substitute_var("foo ${bla} gsff", {"bar": "bla"}))
def test_check_all_substituted(self):
- samba.check_all_substituted("nothing to see here")
- self.assertRaises(Exception, samba.check_all_substituted, "Not subsituted: ${FOOBAR}")
+ samba.check_all_substituted("nothing to see here")
+ self.assertRaises(Exception, samba.check_all_substituted, "Not subsituted: ${FOOBAR}")
class LdbExtensionTests(TestCaseInTempDir):
diff --git a/source4/scripting/python/samba/tests/provision.py b/source4/scripting/python/samba/tests/provision.py
index 352357f694..fdac9d4ea2 100644
--- a/source4/scripting/python/samba/tests/provision.py
+++ b/source4/scripting/python/samba/tests/provision.py
@@ -56,7 +56,7 @@ class ProvisionTestCase(samba.tests.TestCaseInTempDir):
machinepass="machinepass", dnsdomain="example.com")
self.assertEquals(1,
len(secrets_ldb.search("samAccountName=krbtgt,flatname=EXAMPLE,CN=Principals")))
- self.assertEquals("keytab.path",
+ self.assertEquals("keytab.path",
secrets_ldb.searchone(basedn="flatname=EXAMPLE,CN=primary domains",
expression="(privateKeytab=*)",
attribute="privateKeytab"))