From 08d1573bd5b0dd3982dfe0971a1cf2aef234cfa7 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Wed, 22 Aug 2018 17:09:01 +1200 Subject: [PATCH] PEP8: add spaces after operators Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- python/samba/netcmd/ldapcmp.py | 10 +++++----- python/samba/netcmd/ntacl.py | 2 +- python/samba/ntacls.py | 2 +- python/samba/provision/__init__.py | 2 +- python/samba/tests/blackbox/check_output.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/python/samba/netcmd/ldapcmp.py b/python/samba/netcmd/ldapcmp.py index 635b197eb19..5f92745979d 100644 --- a/python/samba/netcmd/ldapcmp.py +++ b/python/samba/netcmd/ldapcmp.py @@ -358,7 +358,7 @@ class Descriptor(object): common_aces.append(ace) self_aces = sorted(self_aces) if len(self_aces) > 0: - res += 4 *" " + "ACEs found only in %s:\n" % self.con.host + res += 4 * " " + "ACEs found only in %s:\n" % self.con.host for ace in self_aces: res += 8 * " " + ace + "\n" # @@ -371,13 +371,13 @@ class Descriptor(object): common_aces.append(ace) other_aces = sorted(other_aces) if len(other_aces) > 0: - res += 4 *" " + "ACEs found only in %s:\n" % other.con.host + res += 4 * " " + "ACEs found only in %s:\n" % other.con.host for ace in other_aces: res += 8 * " " + ace + "\n" # common_aces = sorted(list(set(common_aces))) if self.con.verbose: - res += 4 *" " + "ACEs found in both:\n" + res += 4 * " " + "ACEs found in both:\n" for ace in common_aces: res += 8 * " " + ace + "\n" return (self_aces == [] and other_aces == [], res) @@ -588,7 +588,7 @@ class LDAPObject(object): res += 8 * " " + x + "\n" self.unique_attrs.append(x) # - title = 4 *" " + "Attributes found only in %s:" % other.con.host + title = 4 * " " + "Attributes found only in %s:" % other.con.host for x in other.attributes.keys(): if x not in self.attributes.keys() and \ not x.upper() in [q.upper() for q in self.ignore_attributes]: @@ -718,7 +718,7 @@ class LDAPBundel(object): while counter < len(self.dn_list) and self.two_domains: # Use alias reference tmp = self.dn_list[counter] - tmp = tmp[:len(tmp) -len(self.con.base_dn)] + "${DOMAIN_DN}" + tmp = tmp[:len(tmp) - len(self.con.base_dn)] + "${DOMAIN_DN}" tmp = tmp.replace("CN=%s" % self.con.domain_netbios, "CN=${DOMAIN_NETBIOS}") if len(self.con.server_names) == 1: for x in self.con.server_names: diff --git a/python/samba/netcmd/ntacl.py b/python/samba/netcmd/ntacl.py index f64b04758c5..0af07ff20bf 100644 --- a/python/samba/netcmd/ntacl.py +++ b/python/samba/netcmd/ntacl.py @@ -214,7 +214,7 @@ class cmd_ntacl_sysvolreset(Command): s3conf.set("passdb backend", "samba_dsdb:%s" % samdb.url) LA_sid = security.dom_sid(str(domain_sid) - + "-" +str(security.DOMAIN_RID_ADMINISTRATOR)) + + "-" + str(security.DOMAIN_RID_ADMINISTRATOR)) BA_sid = security.dom_sid(security.SID_BUILTIN_ADMINISTRATORS) s4_passdb = passdb.PDB(s3conf.get("passdb backend")) diff --git a/python/samba/ntacls.py b/python/samba/ntacls.py index 620ec77d48b..3ce27f32600 100644 --- a/python/samba/ntacls.py +++ b/python/samba/ntacls.py @@ -80,7 +80,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): diff --git a/python/samba/provision/__init__.py b/python/samba/provision/__init__.py index 8c0c37917f3..5b0a71f0241 100644 --- a/python/samba/provision/__init__.py +++ b/python/samba/provision/__init__.py @@ -1141,7 +1141,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 = "" diff --git a/python/samba/tests/blackbox/check_output.py b/python/samba/tests/blackbox/check_output.py index 66483548d83..7b92d82fd8c 100644 --- a/python/samba/tests/blackbox/check_output.py +++ b/python/samba/tests/blackbox/check_output.py @@ -53,7 +53,7 @@ class TimeoutHelper(): raise TimeoutHelper.Timeout() -def _make_cmdline(data='$', repeat=5 *1024 *1024, retcode=0): +def _make_cmdline(data='$', repeat=(5 * 1024 * 1024), retcode=0): """Build a command to call gen_output.py to generate large output""" return 'gen_output.py --data {} --repeat {} --retcode {}'.format(data, repeat, retcode) -- 2.47.2