PEP8: fix E222: multiple spaces after operator
authorJoe Guo <joeg@catalyst.net.nz>
Mon, 30 Jul 2018 06:17:44 +0000 (18:17 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Fri, 24 Aug 2018 05:49:27 +0000 (07:49 +0200)
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
24 files changed:
python/samba/ms_schema.py
python/samba/netcmd/delegation.py
python/samba/netcmd/domain.py
python/samba/netcmd/ldapcmp.py
python/samba/netcmd/user.py
python/samba/ntacls.py
python/samba/provision/backend.py
python/samba/provision/sambadns.py
python/samba/tests/dcerpc/raw_protocol.py
python/samba/tests/dcerpc/raw_testcase.py
python/samba/tests/netbios.py
python/samba/tests/samba_tool/group.py
python/samba/tests/samba_tool/ntacl.py
python/samba/tests/samba_tool/user.py
python/samba/upgrade.py
python/samba/upgradehelpers.py
script/autobuild.py
source3/script/tests/test_wbinfo_sids2xids_int.py
source3/selftest/tests.py
source4/dsdb/tests/python/acl.py
source4/dsdb/tests/python/ldap_schema.py
source4/dsdb/tests/python/ndr_pack_performance.py
source4/torture/drs/python/repl_rodc.py
source4/torture/drs/python/ridalloc_exop.py

index 61e2ade6950d8f04633fef265a500e22e96f2789..cd7e5fb12f328574aedf6049d941d16e9150cd13 100644 (file)
@@ -305,7 +305,7 @@ def read_ms_schema(attr_file, classes_file, dump_attributes = True, dump_classes
     classes_ldif = ""
 
     if dump_attributes:
-        attr_ldif =  __parse_schema_file(attr_file, "attributeSchema")
+        attr_ldif = __parse_schema_file(attr_file, "attributeSchema")
     if dump_classes:
         classes_ldif = __parse_schema_file(classes_file, "classSchema")
 
index d8b7a79619e5e8a17249148c8787de5b026073cf..c8275f4156ff8035b638f8b79a131fa22adf1ffd 100644 (file)
@@ -78,7 +78,7 @@ class cmd_delegation_show(Command):
         uac = int(res[0].get("userAccountControl")[0])
         allowed = res[0].get("msDS-AllowedToDelegateTo")
 
-        self.outf.write("Account-DN: %s\n" %  str(res[0].dn))
+        self.outf.write("Account-DN: %s\n" % str(res[0].dn))
         self.outf.write("UF_TRUSTED_FOR_DELEGATION: %s\n"
                         % bool(uac & dsdb.UF_TRUSTED_FOR_DELEGATION))
         self.outf.write("UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION: %s\n" %
index bcf5d4ddb0833b2836a618fae87dd08ea3742537..e8c2e1de9bb357faa0bbead095ec38a498ffae97 100644 (file)
@@ -2324,7 +2324,7 @@ class cmd_domain_trust_create(DomainTrustCommand):
             enc_types.enc_types = security.KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96
             enc_types.enc_types |= security.KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96
 
-        local_policy_access =  lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION
+        local_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION
         local_policy_access |= lsa.LSA_POLICY_TRUST_ADMIN
         local_policy_access |= lsa.LSA_POLICY_CREATE_SECRET
 
@@ -2810,14 +2810,14 @@ class cmd_domain_trust_delete(DomainTrustCommand):
     def run(self, domain, sambaopts=None, localdcopts=None, credopts=None, versionopts=None,
             delete_location=None):
 
-        local_policy_access =  lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION
+        local_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION
         local_policy_access |= lsa.LSA_POLICY_TRUST_ADMIN
         local_policy_access |= lsa.LSA_POLICY_CREATE_SECRET
 
         if delete_location == "local":
             remote_policy_access = None
         else:
-            remote_policy_access =  lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION
+            remote_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION
             remote_policy_access |= lsa.LSA_POLICY_TRUST_ADMIN
             remote_policy_access |= lsa.LSA_POLICY_CREATE_SECRET
 
@@ -2971,7 +2971,7 @@ class cmd_domain_trust_validate(DomainTrustCommand):
     def run(self, domain, sambaopts=None, versionopts=None, credopts=None, localdcopts=None,
             validate_location=None):
 
-        local_policy_access =  lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION
+        local_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION
 
         local_server = self.setup_local_server(sambaopts, localdcopts)
         try:
@@ -3378,7 +3378,7 @@ class cmd_domain_trust_namespaces(DomainTrustCommand):
                         continue
                     raise CommandError("value[%s] specified for --enable-sid and --disable-sid" % e)
 
-        local_policy_access =  lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION
+        local_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION
         if require_update:
             local_policy_access |= lsa.LSA_POLICY_TRUST_ADMIN
 
index 1f662d57ae3a2672f108bab39a1fae659f112f7d..88fe857c825b144cba2849c22d3dc319bcab8b17 100644 (file)
@@ -454,7 +454,7 @@ class LDAPObject(object):
         # Two domains - two domain controllers
 
         if self.two_domains:
-            self.ignore_attributes +=  [
+            self.ignore_attributes += [
                 "objectCategory", "objectGUID", "objectSid", "whenCreated",
                 "whenChanged", "pwdLastSet", "uSNCreated", "creationTime",
                 "modifiedCount", "priorSetTime", "rIDManagerReference",
index 0baffbcb1e5e6c87d9514e2774cca3c02fd6f6a6..868f23c63b10f15b4a9e0be6180571e1f09d2cd7 100644 (file)
@@ -2065,7 +2065,7 @@ samba-tool user syncpasswords --terminate \\
             if self.current_pid is not None:
                 log_msg("currentPid: %d\n" % self.current_pid)
 
-            modify_ldif =  "dn: %s\n" % (self.cache_dn)
+            modify_ldif = "dn: %s\n" % (self.cache_dn)
             modify_ldif += "changetype: modify\n"
             modify_ldif += "replace: currentPid\n"
             if self.current_pid is not None:
@@ -2082,7 +2082,7 @@ samba-tool user syncpasswords --terminate \\
             self.dirsync_controls = [str(res_controls[0]),"extended_dn:1:0"]
             log_msg("dirsyncControls: %r\n" % self.dirsync_controls)
 
-            modify_ldif =  "dn: %s\n" % (self.cache_dn)
+            modify_ldif = "dn: %s\n" % (self.cache_dn)
             modify_ldif += "changetype: modify\n"
             modify_ldif += "replace: dirsyncControl\n"
             modify_ldif += "dirsyncControl: %s\n" % (self.dirsync_controls[0])
@@ -2129,7 +2129,7 @@ samba-tool user syncpasswords --terminate \\
                     add_ldif += "currentTime: %s\n" % ldb.timestring(int(time.time()))
                     self.cache.add_ldif(add_ldif)
                 else:
-                    modify_ldif =  "dn: %s\n" % (dn)
+                    modify_ldif = "dn: %s\n" % (dn)
                     modify_ldif += "changetype: modify\n"
                     modify_ldif += "replace: lastCookie\n"
                     modify_ldif += "lastCookie: %s\n" % (lastCookie)
index 5c561e8bcab777de9a59f74ed36888cf89e9127d..e64892d45cae479a31c0f1863b59788f434c0370 100644 (file)
@@ -295,7 +295,7 @@ def dsacl2fsacl(dssddl, sid, as_sddl=True):
             if str(ace.trustee) == security.SID_CREATOR_OWNER:
                 # For Creator/Owner the IO flag is set as this ACE has only a sense for child objects
                 ace.flags = ace.flags | security.SEC_ACE_FLAG_INHERIT_ONLY
-            ace.access_mask =  ldapmask2filemask(ace.access_mask)
+            ace.access_mask = ldapmask2filemask(ace.access_mask)
             fdescr.dacl_add(ace)
 
     if not as_sddl:
index 35743355819a41541587ca95c2ae88421454ac85..53b03e37acf897acc16ea18d47a5d6ec2184570a 100644 (file)
@@ -283,7 +283,7 @@ class LDAPBackend(ProvisionBackend):
                 count = count + 1
 
                 if count > 15:
-                    self.logger.error("Could not connect to slapd started with: %s" %  "\'" + "\' \'".join(self.slapd_provision_command) + "\'")
+                    self.logger.error("Could not connect to slapd started with: %s" % "\'" + "\' \'".join(self.slapd_provision_command) + "\'")
                     raise ProvisioningError("slapd never accepted a connection within 15 seconds of starting")
 
         self.logger.error("Could not start slapd with: %s" % "\'" + "\' \'".join(self.slapd_provision_command) + "\'")
@@ -592,7 +592,7 @@ class OpenLDAPBackend(LDAPBackend):
         retcode = subprocess.call(slapd_cmd, close_fds=True, shell=False)
 
         if retcode != 0:
-            self.logger.error("conversion from slapd.conf to cn=config failed slapd started with: %s" %  "\'" + "\' \'".join(slapd_cmd) + "\'")
+            self.logger.error("conversion from slapd.conf to cn=config failed slapd started with: %s" % "\'" + "\' \'".join(slapd_cmd) + "\'")
             raise ProvisioningError("conversion from slapd.conf to cn=config failed")
 
         if not os.path.exists(os.path.join(self.olcdir, "cn=config.ldif")):
index c716df4d7dc4f7abdb77d076fadae57482103dd6..3657c0cf4a9ce501f262fc97531ec50b4b7228f6 100644 (file)
@@ -63,7 +63,7 @@ from samba.samdb import get_default_backend_store
 
 def get_domainguid(samdb, domaindn):
     res = samdb.search(base=domaindn, scope=ldb.SCOPE_BASE, attrs=["objectGUID"])
-    domainguid =  str(ndr_unpack(misc.GUID, res[0]["objectGUID"][0]))
+    domainguid = str(ndr_unpack(misc.GUID, res[0]["objectGUID"][0]))
     return domainguid
 
 
index 2a1a87be492ae83e75082b9501cadfa4822c270a..006195035c66aa195a50c3dc546c0e61065d9931 100755 (executable)
@@ -1330,7 +1330,7 @@ class TestDCERPC_BIND(RawDCERPCTest):
         features1 = 0
         btf1 = base.bind_time_features_syntax(features1)
 
-        features2 =  dcerpc.DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN
+        features2 = dcerpc.DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN
         features2 |= dcerpc.DCERPC_BIND_TIME_SECURITY_CONTEXT_MULTIPLEXING
         btf2 = base.bind_time_features_syntax(features2)
 
index 260abdcc487de494307c74301d12b5f7a807e276..7726f9b3f7bc688579625b68ea3bbace87692ab3 100644 (file)
@@ -340,7 +340,7 @@ class RawDCERPCTest(TestCase):
         else:
             auth_info=""
 
-        pfc_flags =  samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_FIRST
+        pfc_flags = samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_FIRST
         pfc_flags |= samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_LAST
         if object is not None:
             pfc_flags |= samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_OBJECT_UUID
index 65ec5f1d7d1d47049c2e1843a0a3b1e78ec0d8e9..929c36e9ef231c1464df4dac2fa9ae5aca5fd10e 100644 (file)
@@ -23,7 +23,7 @@ class NetBiosTests(samba.tests.TestCase):
         super(NetBiosTests, self).setUp()
         self.n = netbios.Node()
         self.ifc = os.environ["SERVER_IP"]
-        self.dc =  os.environ["DC_NETBIOSNAME"]
+        self.dc = os.environ["DC_NETBIOSNAME"]
     def tearDown(self):
         super(NetBiosTests, self).tearDown()
     def test_query_name(self):
index 6753691fd9c2c17e62b2d4cc9ce186d98d7dccc1..bc966ff3e22a8eba03a9d30c071a5ed6efed5873 100644 (file)
@@ -81,7 +81,7 @@ class GroupCmdTestCase(SambaToolCmdTest):
 
         # test adding groups
         for group in self.groups:
-            (result, out, err) =  self.runsubcmd("group", "add", group["name"],
+            (result, out, err) = self.runsubcmd("group", "add", group["name"],
                                                  "--description=%s" % group["description"],
                                                  "-H", "ldap://%s" % os.environ["DC_SERVER"],
                                                  "-U%s%%%s" % (os.environ["DC_USERNAME"],
@@ -140,7 +140,7 @@ class GroupCmdTestCase(SambaToolCmdTest):
 
     def test_move(self):
         full_ou_dn = str(self.samdb.normalize_dn_in_domain("OU=movetest"))
-        (result, out, err) =  self.runsubcmd("ou", "create", full_ou_dn)
+        (result, out, err) = self.runsubcmd("ou", "create", full_ou_dn)
         self.assertCmdSuccess(result, out, err)
         self.assertEquals(err, "", "There shouldn't be any error message")
         self.assertIn('Created ou "%s"' % full_ou_dn, out)
@@ -153,7 +153,7 @@ class GroupCmdTestCase(SambaToolCmdTest):
                           (group["name"], full_ou_dn), out)
 
         # Should fail as groups objects are in OU
-        (result, out, err) =  self.runsubcmd("ou", "delete", full_ou_dn)
+        (result, out, err) = self.runsubcmd("ou", "delete", full_ou_dn)
         self.assertCmdFail(result)
         self.assertIn(("subtree_delete: Unable to delete a non-leaf node "
                        "(it has %d children)!") % len(self.groups), err)
index c01d5acd73f8a76c944485d9ee81b365a1722aaf..c84c60ee4fb117b5b076b8c45014966b58ef4515 100644 (file)
@@ -29,14 +29,14 @@ class NtACLCmdSysvolTestCase(SambaToolCmdTest):
 
 
     def test_ntvfs(self):
-        (result, out, err) =  self.runsubcmd("ntacl", "sysvolreset",
+        (result, out, err) = self.runsubcmd("ntacl", "sysvolreset",
                                              "--use-ntvfs")
         self.assertCmdSuccess(result, out, err)
         self.assertEquals(out,"","Shouldn't be any output messages")
         self.assertIn("Please note that POSIX permissions have NOT been changed, only the stored NT ACL", err)
 
     def test_s3fs(self):
-        (result, out, err) =  self.runsubcmd("ntacl", "sysvolreset",
+        (result, out, err) = self.runsubcmd("ntacl", "sysvolreset",
                                              "--use-s3fs")
 
         self.assertCmdSuccess(result, out, err)
@@ -44,19 +44,19 @@ class NtACLCmdSysvolTestCase(SambaToolCmdTest):
         self.assertEquals(out,"","Shouldn't be any output messages")
 
     def test_ntvfs_check(self):
-        (result, out, err) =  self.runsubcmd("ntacl", "sysvolreset",
+        (result, out, err) = self.runsubcmd("ntacl", "sysvolreset",
                                              "--use-ntvfs")
         self.assertCmdSuccess(result, out, err)
         self.assertEquals(out,"","Shouldn't be any output messages")
         self.assertIn("Please note that POSIX permissions have NOT been changed, only the stored NT ACL", err)
         # Now check they were set correctly
-        (result, out, err) =  self.runsubcmd("ntacl", "sysvolcheck")
+        (result, out, err) = self.runsubcmd("ntacl", "sysvolcheck")
         self.assertCmdSuccess(result, out, err)
         self.assertEquals(err,"","Shouldn't be any error messages")
         self.assertEquals(out,"","Shouldn't be any output messages")
 
     def test_s3fs_check(self):
-        (result, out, err) =  self.runsubcmd("ntacl", "sysvolreset",
+        (result, out, err) = self.runsubcmd("ntacl", "sysvolreset",
                                              "--use-s3fs")
 
         self.assertCmdSuccess(result, out, err)
@@ -64,7 +64,7 @@ class NtACLCmdSysvolTestCase(SambaToolCmdTest):
         self.assertEquals(out,"","Shouldn't be any output messages")
 
         # Now check they were set correctly
-        (result, out, err) =  self.runsubcmd("ntacl", "sysvolcheck")
+        (result, out, err) = self.runsubcmd("ntacl", "sysvolcheck")
         self.assertCmdSuccess(result, out, err)
         self.assertEquals(err,"","Shouldn't be any error messages")
         self.assertEquals(out,"","Shouldn't be any output messages")
@@ -80,7 +80,7 @@ class NtACLCmdGetSetTestCase(SambaToolCmdTest):
         tempf = os.path.join(path,"pytests"+str(int(100000*random.random())))
         open(tempf, 'w').write("empty")
 
-        (result, out, err) =  self.runsubcmd("ntacl", "set", self.acl, tempf,
+        (result, out, err) = self.runsubcmd("ntacl", "set", self.acl, tempf,
                                              "--use-ntvfs")
         self.assertCmdSuccess(result, out, err)
         self.assertEquals(out,"","Shouldn't be any output messages")
@@ -91,7 +91,7 @@ class NtACLCmdGetSetTestCase(SambaToolCmdTest):
         tempf = os.path.join(path,"pytests"+str(int(100000*random.random())))
         open(tempf, 'w').write("empty")
 
-        (result, out, err) =  self.runsubcmd("ntacl", "set", self.acl, tempf,
+        (result, out, err) = self.runsubcmd("ntacl", "set", self.acl, tempf,
                                              "--use-s3fs")
 
         self.assertCmdSuccess(result, out, err)
@@ -103,14 +103,14 @@ class NtACLCmdGetSetTestCase(SambaToolCmdTest):
         tempf = os.path.join(path,"pytests"+str(int(100000*random.random())))
         open(tempf, 'w').write("empty")
 
-        (result, out, err) =  self.runsubcmd("ntacl", "set", self.acl, tempf,
+        (result, out, err) = self.runsubcmd("ntacl", "set", self.acl, tempf,
                                              "--use-ntvfs")
         self.assertCmdSuccess(result, out, err)
         self.assertEquals(out,"","Shouldn't be any output messages")
         self.assertIn("Please note that POSIX permissions have NOT been changed, only the stored NT ACL", err)
 
         # Now check they were set correctly
-        (result, out, err) =  self.runsubcmd("ntacl",  "get", tempf,
+        (result, out, err) = self.runsubcmd("ntacl",  "get", tempf,
                                              "--use-ntvfs", "--as-sddl")
         self.assertCmdSuccess(result, out, err)
         self.assertEquals(err,"","Shouldn't be any error messages")
@@ -121,14 +121,14 @@ class NtACLCmdGetSetTestCase(SambaToolCmdTest):
         tempf = os.path.join(path,"pytests"+str(int(100000*random.random())))
         open(tempf, 'w').write("empty")
 
-        (result, out, err) =  self.runsubcmd("ntacl", "set", self.acl, tempf,
+        (result, out, err) = self.runsubcmd("ntacl", "set", self.acl, tempf,
                                              "--use-s3fs")
         self.assertCmdSuccess(result, out, err)
         self.assertEquals(out,"","Shouldn't be any output messages")
         self.assertEquals(err,"","Shouldn't be any error messages")
 
         # Now check they were set correctly
-        (result, out, err) =  self.runsubcmd("ntacl",  "get", tempf,
+        (result, out, err) = self.runsubcmd("ntacl",  "get", tempf,
                                              "--use-s3fs", "--as-sddl")
         self.assertCmdSuccess(result, out, err)
         self.assertEquals(err,"","Shouldn't be any error messages")
index e219d68aaba3c14213e1c22a189a58bf8f477d70..4d264b4027d4880e43a4e393fea7f9ee424f76b2 100644 (file)
@@ -82,7 +82,7 @@ class UserCmdTestCase(SambaToolCmdTest):
 
         # test adding users with --use-username-as-cn
         for user in self.users:
-            (result, out, err) =  self.runsubcmd("user", "create", user["name"], user["password"],
+            (result, out, err) = self.runsubcmd("user", "create", user["name"], user["password"],
                                                  "--use-username-as-cn",
                                                  "--surname=%s" % user["surname"],
                                                  "--given-name=%s" % user["given-name"],
@@ -389,7 +389,7 @@ sAMAccountName: %s
 
     def test_move(self):
         full_ou_dn = str(self.samdb.normalize_dn_in_domain("OU=movetest"))
-        (result, out, err) =  self.runsubcmd("ou", "create", full_ou_dn)
+        (result, out, err) = self.runsubcmd("ou", "create", full_ou_dn)
         self.assertCmdSuccess(result, out, err)
         self.assertEquals(err, "", "There shouldn't be any error message")
         self.assertIn('Created ou "%s"' % full_ou_dn, out)
@@ -402,7 +402,7 @@ sAMAccountName: %s
                           (user["name"], full_ou_dn), out)
 
         # Should fail as users objects are in OU
-        (result, out, err) =  self.runsubcmd("ou", "delete", full_ou_dn)
+        (result, out, err) = self.runsubcmd("ou", "delete", full_ou_dn)
         self.assertCmdFail(result)
         self.assertIn(("subtree_delete: Unable to delete a non-leaf node "
                        "(it has %d children)!") % len(self.users), err)
index f5fffbd404d8ebb1bca58f347fb55080df122235..69b4e290b766bf76cf9268e031a5ff7538da8676 100644 (file)
@@ -467,7 +467,7 @@ def upgrade_from_samba3(samba3, logger, targetdir, session_info=None,
         machinepass = None
 
     if samba3.lp.get("passdb backend").split(":")[0].strip() == "ldapsam":
-        base_dn =  samba3.lp.get("ldap suffix")
+        base_dn = samba3.lp.get("ldap suffix")
         ldapuser = samba3.lp.get("ldap admin dn")
         ldappass = secrets_db.get_ldap_bind_pw(ldapuser)
         if ldappass is None:
index e8f0dba8cdcf307b9c3cb579d24e74e27c5192e6..90c65377d40a663ac00e36848e2cbea629d2b789 100644 (file)
@@ -49,13 +49,13 @@ import tempfile
 # And so opening them create a file in the current directory which is not what
 # we want
 # I still keep them commented because I plan soon to make more cleaner
-ERROR =     -1
-SIMPLE =     0x00
-CHANGE =     0x01
-CHANGESD =     0x02
-GUESS =     0x04
-PROVISION =    0x08
-CHANGEALL =    0xff
+ERROR = -1
+SIMPLE = 0x00
+CHANGE = 0x01
+CHANGESD = 0x02
+GUESS = 0x04
+PROVISION = 0x08
+CHANGEALL = 0xff
 
 hashAttrNotCopied = set(["dn", "whenCreated", "whenChanged", "objectGUID",
                          "uSNCreated", "replPropertyMetaData", "uSNChanged", "parentGUID",
@@ -173,7 +173,7 @@ def usn_in_range(usn, range):
     cont = True
     ok = False
     while cont:
-        if idx ==  len(range):
+        if idx == len(range):
             cont = False
             continue
         if usn < int(range[idx]):
index 4a27e1b5255590d5405d68346332b7ab01abfcf7..dc5af0f0dca4e9829ef88ee5a3647b75a0a8fd20 100755 (executable)
@@ -77,7 +77,7 @@ if os.environ.get("AUTOBUILD_SKIP_SAMBA_O3", "0") == "1":
 ctdb_configure_params = " --enable-developer --picky-developer ${PREFIX}"
 samba_configure_params = " --picky-developer ${PREFIX} ${EXTRA_PYTHON} --with-profiling-data"
 
-samba_libs_envvars =  "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH"
+samba_libs_envvars = "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH"
 samba_libs_envvars += " PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig"
 samba_libs_envvars += " ADDITIONAL_CFLAGS='-Wmissing-prototypes'"
 samba_libs_configure_base = samba_libs_envvars + " ./configure --abi-check --enable-debug --picky-developer -C ${PREFIX}"
index 7ffc8ece2f72cc0bd75e33ed724ce4147fcc3dbc..a460d8abce629ba158601cbceffe5269c8e1e8bc 100755 (executable)
@@ -39,7 +39,7 @@ sids=[domsid + '-512', 'S-1-5-32-545', domsid + '-513', 'S-1-1-0', 'S-1-3-1', 'S
 
 flush_cache(sids=sids)
 
-sids2xids = subprocess.Popen([wbinfo, '--sids-to-unix-ids=' +  ','.join(sids)],
+sids2xids = subprocess.Popen([wbinfo, '--sids-to-unix-ids=' + ','.join(sids)],
                              stdout=subprocess.PIPE).communicate()[0].strip()
 
 gids=[]
@@ -87,7 +87,7 @@ def check_singular(sids, ids, idtype='gid'):
 # Check the list produced by the sids-to-xids call with the
 # multiple variant (sid-to-xid) for each sid in turn.
 def check_multiple(sids, idtypes):
-    sids2xids = subprocess.Popen([wbinfo, '--sids-to-unix-ids=' +  ','.join(sids)],
+    sids2xids = subprocess.Popen([wbinfo, '--sids-to-unix-ids=' + ','.join(sids)],
                                  stdout=subprocess.PIPE).communicate()[0].strip()
     # print sids2xids
     i = 0
index e5b3fd6f33ba163e6f7a7b925490f2e9366d221f..393b0d9f60a0ed0e135641894ece639ccf0c19e9 100755 (executable)
@@ -461,7 +461,7 @@ for t in tests:
     elif t == "raw.chkpath":
         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
-    elif t == "raw.samba3hide" or t == "raw.samba3checkfsp" or t ==  "raw.samba3closeerr":
+    elif t == "raw.samba3hide" or t == "raw.samba3checkfsp" or t == "raw.samba3closeerr":
         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
         plansmbtorture4testsuite(t, "simpleserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
index 6803483dc467a4b5d982b09d6d676c17031399dc..f2f87bc765e1c41f6a3d0a8ccc0de915c3cb5e9c 100755 (executable)
@@ -544,7 +544,7 @@ adminDescription: blah blah blah"""
 dn: CN=test_modify_group2,CN=Users,""" + self.base_dn + """
 changetype: modify
 add: Member
-Member: """ +  self.get_user_dn(self.user_with_sm)
+Member: """ + self.get_user_dn(self.user_with_sm)
 #the user has no rights granted, this should fail
         try:
             self.ldb_user2.modify_ldif(ldif)
@@ -583,7 +583,7 @@ Member: CN=test_modify_user2,CN=Users,""" + self.base_dn
 dn: CN=test_modify_group2,CN=Users,""" + self.base_dn + """
 changetype: modify
 add: Member
-Member: """ +  self.get_user_dn(self.user_with_sm) + """
+Member: """ + self.get_user_dn(self.user_with_sm) + """
 Member: CN=test_modify_user2,CN=Users,""" + self.base_dn
 
 #grant self-membership, should be able to add himself  but not others at the same time
@@ -608,7 +608,7 @@ Member: CN=test_modify_user2,CN=Users,""" + self.base_dn
 dn: CN=test_modify_group2,CN=Users,""" + self.base_dn + """
 changetype: modify
 add: Member
-Member: """ +  self.get_user_dn(self.user_with_wp)
+Member: """ + self.get_user_dn(self.user_with_wp)
         self.ldb_user.modify_ldif(ldif)
         res = self.ldb_admin.search(self.base_dn, expression="(distinguishedName=%s)" \
                                      % ("CN=test_modify_group2,CN=Users," + self.base_dn), attrs=["Member"])
@@ -1981,11 +1981,11 @@ class AclSPNTests(AclTests):
         ctx.connection_dn = "CN=RODC Connection (FRS),%s" % ctx.ntds_dn
         ctx.secure_channel_type = misc.SEC_CHAN_RODC
         ctx.RODC = True
-        ctx.replica_flags  =  (drsuapi.DRSUAPI_DRS_INIT_SYNC |
-                               drsuapi.DRSUAPI_DRS_PER_SYNC |
-                               drsuapi.DRSUAPI_DRS_GET_ANC |
-                               drsuapi.DRSUAPI_DRS_NEVER_SYNCED |
-                               drsuapi.DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING)
+        ctx.replica_flags = (drsuapi.DRSUAPI_DRS_INIT_SYNC |
+                             drsuapi.DRSUAPI_DRS_PER_SYNC |
+                             drsuapi.DRSUAPI_DRS_GET_ANC |
+                             drsuapi.DRSUAPI_DRS_NEVER_SYNCED |
+                             drsuapi.DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING)
 
         ctx.join_add_objects()
 
index d937475f8c926bedc9f840d4d5e0b4dc1c5be3fd..f60f36d3e00ba4a1257bf81a0e94d9b3da689d3e 100755 (executable)
@@ -1625,7 +1625,7 @@ class SchemaTests_msDS_isRODC(samba.tests.TestCase):
 
     def setUp(self):
         super(SchemaTests_msDS_isRODC, self).setUp()
-        self.ldb =  SamDB(host, credentials=creds,
+        self.ldb = SamDB(host, credentials=creds,
                           session_info=system_session(lp), lp=lp, options=ldb_options)
         res = self.ldb.search(base="", expression="", scope=SCOPE_BASE, attrs=["defaultNamingContext"])
         self.assertEquals(len(res), 1)
index c5a42c60f61c388a75efa79a3ab00c7b551f896f..27fd79a56fd50f719172fe6c3f28930039e0a65e 100644 (file)
@@ -208,7 +208,7 @@ class UserTests(samba.tests.TestCase):
 
     def test_pack_repl_sample(self):
         blob = self.get_file_blob('testdata/replication-ndrpack-example.gz')
-        desc =  ndr_unpack(drsuapi.DsGetNCChangesCtr6, blob)
+        desc = ndr_unpack(drsuapi.DsGetNCChangesCtr6, blob)
         self._test_pack(desc, cycles=20)
 
 if "://" not in host:
index 893bfcc037ca279b861b7074a664d2ef86b62c89..abd070664f96371b1f620ecdf194d1903b32030c 100644 (file)
@@ -683,10 +683,10 @@ class DrsRodcTestCase(drs_base.DrsBaseTestCase):
         ctx.connection_dn = "CN=RODC Connection (FRS),%s" % ctx.ntds_dn
         ctx.secure_channel_type = misc.SEC_CHAN_RODC
         ctx.RODC = True
-        ctx.replica_flags  =  (drsuapi.DRSUAPI_DRS_INIT_SYNC |
-                               drsuapi.DRSUAPI_DRS_PER_SYNC |
-                               drsuapi.DRSUAPI_DRS_GET_ANC |
-                               drsuapi.DRSUAPI_DRS_NEVER_SYNCED |
-                               drsuapi.DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING)
+        ctx.replica_flags = (drsuapi.DRSUAPI_DRS_INIT_SYNC |
+                             drsuapi.DRSUAPI_DRS_PER_SYNC |
+                             drsuapi.DRSUAPI_DRS_GET_ANC |
+                             drsuapi.DRSUAPI_DRS_NEVER_SYNCED |
+                             drsuapi.DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING)
 
         ctx.join_add_objects()
index 93101d70e10077b7c0ef7b4cde2db16e9a50c683..0aa004459ac2e8816f80d1a423bad5e45ea3b56b 100644 (file)
@@ -219,7 +219,7 @@ class DrsReplicaSyncTestCase(drs_base.DrsBaseTestCase):
             ldb_dc1.modify(m)
         except ldb.LdbError as e1:
             (num, msg) = e1.args
-            self.fail("Failed to reassign RID Master " +  msg)
+            self.fail("Failed to reassign RID Master " + msg)
 
         try:
             # 2. Perform a RID alloc
@@ -260,7 +260,7 @@ class DrsReplicaSyncTestCase(drs_base.DrsBaseTestCase):
                 ldb_dc2.modify(m)
             except ldb.LdbError as e:
                 (num, msg) = e.args
-                self.fail("Failed to restore RID Master " +  msg)
+                self.fail("Failed to restore RID Master " + msg)
 
     def test_offline_samba_tool_seized_ridalloc(self):
         """Perform a join against the non-RID manager and then seize the RID Manager role"""