mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
PEP8: fix E228: missing whitespace around modulo operator
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>
This commit is contained in:
parent
e1edeae83c
commit
35de42275b
@ -78,7 +78,7 @@ def checkset_backend(lp, backend, eadbfile):
|
||||
else:
|
||||
return (samba.xattr_tdb, os.path.abspath(os.path.join(lp.get("state dir"), "xattr.tdb")))
|
||||
else:
|
||||
raise XattrBackendError("Invalid xattr backend choice %s"%backend)
|
||||
raise XattrBackendError("Invalid xattr backend choice %s" %backend)
|
||||
|
||||
def getdosinfo(lp, file):
|
||||
try:
|
||||
|
@ -1140,7 +1140,7 @@ def setup_self_join(samdb, admin_session_info, names, fill, machinepass,
|
||||
"""Join a host to its own domain."""
|
||||
assert isinstance(invocationid, str)
|
||||
if ntdsguid is not None:
|
||||
ntdsguid_line = "objectGUID: %s\n"%ntdsguid
|
||||
ntdsguid_line = "objectGUID: %s\n" %ntdsguid
|
||||
else:
|
||||
ntdsguid_line = ""
|
||||
|
||||
@ -1610,7 +1610,7 @@ def set_gpos_acl(sysvol, dnsdomain, domainsid, domaindn, samdb, lp, use_ntvfs, p
|
||||
setntacl(lp, root_policy_path, POLICIES_ACL, str(domainsid),
|
||||
use_ntvfs=use_ntvfs, skip_invalid_chown=True, passdb=passdb, service=SYSVOL_SERVICE)
|
||||
|
||||
res = samdb.search(base="CN=Policies,CN=System,%s"%(domaindn),
|
||||
res = samdb.search(base="CN=Policies,CN=System,%s" %(domaindn),
|
||||
attrs=["cn", "nTSecurityDescriptor"],
|
||||
expression="", scope=ldb.SCOPE_ONELEVEL)
|
||||
|
||||
@ -1783,7 +1783,7 @@ def check_gpos_acl(sysvol, dnsdomain, domainsid, domaindn, samdb, lp,
|
||||
fsacl_sddl = fsacl.as_sddl(domainsid)
|
||||
if fsacl_sddl != POLICIES_ACL:
|
||||
raise ProvisioningError('%s ACL on policy root %s %s does not match expected value %s from provision' % (acl_type(direct_db_access), root_policy_path, fsacl_sddl, fsacl))
|
||||
res = samdb.search(base="CN=Policies,CN=System,%s"%(domaindn),
|
||||
res = samdb.search(base="CN=Policies,CN=System,%s" %(domaindn),
|
||||
attrs=["cn", "nTSecurityDescriptor"],
|
||||
expression="", scope=ldb.SCOPE_ONELEVEL)
|
||||
|
||||
|
@ -560,8 +560,8 @@ def construct_existor_expr(attrs):
|
||||
if len(attrs) > 0:
|
||||
expr = "(|"
|
||||
for att in attrs:
|
||||
expr = "%s(%s=*)"%(expr,att)
|
||||
expr = "%s)"%expr
|
||||
expr = "%s(%s=*)" %(expr,att)
|
||||
expr = "%s)" %expr
|
||||
return expr
|
||||
|
||||
def update_machine_account_password(samdb, secrets_ldb, names):
|
||||
@ -809,7 +809,7 @@ def print_provision_ranges(dic, limit_print, dest, samdb_path, invocationid):
|
||||
print("To track the USNs modified/created by provision and upgrade proivsion,")
|
||||
print(" the following ranges are proposed to be added to your provision sam.ldb: \n%s" % ldif)
|
||||
print("We recommend to review them, and if it's correct to integrate the following ldif: %s in your sam.ldb" % file)
|
||||
print("You can load this file like this: ldbadd -H %s %s\n"%(str(samdb_path),file))
|
||||
print("You can load this file like this: ldbadd -H %s %s\n" %(str(samdb_path),file))
|
||||
ldif = "dn: @PROVISION\nprovisionnerID: %s\n%s" % (invocationid, ldif)
|
||||
open(file,'w').write(ldif)
|
||||
|
||||
|
@ -107,7 +107,7 @@ class DrsFsmoTestCase(drs_base.DrsBaseTestCase):
|
||||
role_dn=role_dn,
|
||||
master=self.dsServiceName_dc2)
|
||||
self.assertTrue(res,
|
||||
"Transferring %s role to %s has failed, master is: %s!"%(role, self.dsServiceName_dc2, master))
|
||||
"Transferring %s role to %s has failed, master is: %s!" %(role, self.dsServiceName_dc2, master))
|
||||
|
||||
# dc1 gets back the role from dc2
|
||||
print("Testing for %s role transfer from %s to %s" % (role, self.dnsname_dc2, self.dnsname_dc1))
|
||||
@ -117,7 +117,7 @@ class DrsFsmoTestCase(drs_base.DrsBaseTestCase):
|
||||
role_dn=role_dn,
|
||||
master=self.dsServiceName_dc1)
|
||||
self.assertTrue(res,
|
||||
"Transferring %s role to %s has failed, master is: %s!"%(role, self.dsServiceName_dc1, master))
|
||||
"Transferring %s role to %s has failed, master is: %s!" %(role, self.dsServiceName_dc1, master))
|
||||
|
||||
# dc1 keeps the role
|
||||
print("Testing for no-op %s role transfer from %s to %s" % (role, self.dnsname_dc2, self.dnsname_dc1))
|
||||
@ -127,7 +127,7 @@ class DrsFsmoTestCase(drs_base.DrsBaseTestCase):
|
||||
role_dn=role_dn,
|
||||
master=self.dsServiceName_dc1)
|
||||
self.assertTrue(res,
|
||||
"Transferring %s role to %s has failed, master is: %s!"%(role, self.dsServiceName_dc1, master))
|
||||
"Transferring %s role to %s has failed, master is: %s!" %(role, self.dsServiceName_dc1, master))
|
||||
|
||||
def test_SchemaMasterTransfer(self):
|
||||
self._role_transfer(role="schema", role_dn=self.schema_dn)
|
||||
|
@ -122,7 +122,7 @@ class DrsReplicaSyncTestCase(drs_base.DrsBaseTestCase):
|
||||
# determine the owner dc
|
||||
res = self.ldb_dc1.search(fsmo_obj_dn,
|
||||
scope=SCOPE_BASE, attrs=["fSMORoleOwner"])
|
||||
assert len(res) == 1, "Only one fSMORoleOwner value expected for %s!"%fsmo_obj_dn
|
||||
assert len(res) == 1, "Only one fSMORoleOwner value expected for %s!" %fsmo_obj_dn
|
||||
fsmo_owner = res[0]["fSMORoleOwner"][0]
|
||||
if fsmo_owner == self.info_dc1["dsServiceName"][0]:
|
||||
return (fsmo_info_1, fsmo_info_2)
|
||||
|
@ -83,7 +83,7 @@ class DrsReplicaSyncTestCase(drs_base.DrsBaseTestCase):
|
||||
# determine the owner dc
|
||||
res = self.ldb_dc1.search(fsmo_obj_dn,
|
||||
scope=SCOPE_BASE, attrs=["fSMORoleOwner"])
|
||||
assert len(res) == 1, "Only one fSMORoleOwner value expected for %s!"%fsmo_obj_dn
|
||||
assert len(res) == 1, "Only one fSMORoleOwner value expected for %s!" %fsmo_obj_dn
|
||||
fsmo_owner = res[0]["fSMORoleOwner"][0]
|
||||
if fsmo_owner == self.info_dc1["dsServiceName"][0]:
|
||||
return (fsmo_info_1, fsmo_info_2)
|
||||
|
Loading…
Reference in New Issue
Block a user