PEP8: add spaces after operators
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 22 Aug 2018 05:09:01 +0000 (17:09 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Fri, 24 Aug 2018 05:49:31 +0000 (07:49 +0200)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/ldapcmp.py
python/samba/netcmd/ntacl.py
python/samba/ntacls.py
python/samba/provision/__init__.py
python/samba/tests/blackbox/check_output.py

index 635b197eb19399399b29099baeb29f1c165158a2..5f92745979dac7c84ee203be48e8db842c72fa5f 100644 (file)
@@ -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:
index f64b04758c5710f03875e588ebd6e850f8934f01..0af07ff20bff680e65ce4a662e250494b469ea4b 100644 (file)
@@ -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"))
index 620ec77d48bb9568593fd3269ed4a9f721cd420b..3ce27f32600ef3a03520e8848fbdcbb48e5aa9e1 100644 (file)
@@ -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):
index 8c0c37917f3a4e2197cb9369e48f0a9c496a46cd..5b0a71f0241185463b5244e51e4efa37a1242ba1 100644 (file)
@@ -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 = ""
 
index 66483548d8309408bb252b4a62cbe78cdc9eb0d4..7b92d82fd8c8f2f49a76304074be4155a437776e 100644 (file)
@@ -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)