From aa243d1a7f64c474265b7f735601139ab9ff7b92 Mon Sep 17 00:00:00 2001 From: Joe Guo Date: Mon, 30 Jul 2018 18:22:52 +1200 Subject: [PATCH] PEP8: fix W291: trailing whitespace Signed-off-by: Joe Guo Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- examples/logon/ntlogon/ntlogon.py | 4 ++-- python/examples/netbios.py | 6 +++--- python/examples/samr.py | 6 +++--- python/examples/winreg.py | 2 +- script/generate_param.py | 8 ++++---- source4/dsdb/tests/python/acl.py | 2 +- source4/dsdb/tests/python/urgent_replication.py | 4 ++-- source4/lib/wmi/wmi.py | 6 +++--- source4/torture/drs/python/linked_attributes_drs.py | 2 +- wintest/test-s3.py | 2 +- wintest/wintest.py | 2 +- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/examples/logon/ntlogon/ntlogon.py b/examples/logon/ntlogon/ntlogon.py index c0f6ebc6c0e..ff25c42ec0b 100755 --- a/examples/logon/ntlogon/ntlogon.py +++ b/examples/logon/ntlogon/ntlogon.py @@ -321,7 +321,7 @@ def run(): # # open the configuration file - # + # try: iFile = open(configfile, 'r') except IOError: @@ -330,7 +330,7 @@ def run(): # # open the output file - # + # if not debug: try: oFile = open(outdir + outfile, 'w') diff --git a/python/examples/netbios.py b/python/examples/netbios.py index a29b09f0517..5f71f27b1f4 100644 --- a/python/examples/netbios.py +++ b/python/examples/netbios.py @@ -2,17 +2,17 @@ # Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij 2008 -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program. If not, see . # diff --git a/python/examples/samr.py b/python/examples/samr.py index c1af82105aa..494d0862592 100755 --- a/python/examples/samr.py +++ b/python/examples/samr.py @@ -5,17 +5,17 @@ # Copyright © Jelmer Vernooij 2008 # # Based on samr.js © Andrew Tridgell -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program. If not, see . # diff --git a/python/examples/winreg.py b/python/examples/winreg.py index eff9f5a6dc8..604fe1db41a 100755 --- a/python/examples/winreg.py +++ b/python/examples/winreg.py @@ -18,7 +18,7 @@ import samba.getopt as options parser = optparse.OptionParser("%s [path]" % sys.argv[0]) sambaopts = options.SambaOptions(parser) parser.add_option_group(sambaopts) -parser.add_option("--createkey", type="string", metavar="KEYNAME", +parser.add_option("--createkey", type="string", metavar="KEYNAME", help="create a key") opts, args = parser.parse_args() diff --git a/script/generate_param.py b/script/generate_param.py index 2abe6ca4211..5fa3c193a2c 100644 --- a/script/generate_param.py +++ b/script/generate_param.py @@ -49,7 +49,7 @@ if options.output is None: def iterate_all(path): - """Iterate and yield all the parameters. + """Iterate and yield all the parameters. :param path: path to parameters xml file """ @@ -134,12 +134,12 @@ def generate_functions(path_in, path_out): output_string = "FN" temp = context_dict.get(parameter['context']) - if temp is None: + if temp is None: raise Exception(parameter['name'] + " has an invalid context " + parameter['context']) output_string += temp if parameter['constant']: output_string += "_CONST" - if parameter['parm']: + if parameter['parm']: output_string += "_PARM" temp = param_type_dict.get(parameter['type']) if temp is None: @@ -274,7 +274,7 @@ def make_param_defs(path_in, path_out, scope): header = get_header(path_out) file_out.write("#ifndef %s\n" % header) file_out.write("#define %s\n\n" % header) - if scope == "GLOBAL": + if scope == "GLOBAL": file_out.write("/**\n") file_out.write(" * This structure describes global (ie., server-wide) parameters.\n") file_out.write(" */\n") diff --git a/source4/dsdb/tests/python/acl.py b/source4/dsdb/tests/python/acl.py index aaa7995be97..48bdd2aece2 100755 --- a/source4/dsdb/tests/python/acl.py +++ b/source4/dsdb/tests/python/acl.py @@ -833,7 +833,7 @@ class AclSearchTests(AclTests): self.ldb_admin.create_ou("OU=ou4,OU=ou2,OU=ou1," + self.base_dn) self.ldb_admin.create_ou("OU=ou5,OU=ou3,OU=ou2,OU=ou1," + self.base_dn) self.ldb_admin.create_ou("OU=ou6,OU=ou4,OU=ou2,OU=ou1," + self.base_dn) - mod = "(D;;LC;;;%s)(D;;LC;;;%s)" % (str(self.user_sid), str(self.group_sid)) + mod = "(D;;LC;;;%s)(D;;LC;;;%s)" % (str(self.user_sid), str(self.group_sid)) self.sd_utils.dacl_add_ace("OU=ou2,OU=ou1," + self.base_dn, mod) res = self.ldb_user3.search("OU=ou1," + self.base_dn, expression="(objectClass=*)", scope=SCOPE_SUBTREE) diff --git a/source4/dsdb/tests/python/urgent_replication.py b/source4/dsdb/tests/python/urgent_replication.py index de412c6130b..f8ea3353ca0 100755 --- a/source4/dsdb/tests/python/urgent_replication.py +++ b/source4/dsdb/tests/python/urgent_replication.py @@ -210,7 +210,7 @@ defaultHidingValue: TRUE""") except LdbError: print("Not testing urgent replication when creating classSchema object ...\n") - # urgent replication should be enabled when modifying + # urgent replication should be enabled when modifying m = Message() m.dn = Dn(self.ldb, "CN=test classSchema,CN=Schema,CN=Configuration," + self.base_dn) m["lDAPDisplayName"] = MessageElement("updatedTestClassSchema", FLAG_MOD_REPLACE, @@ -273,7 +273,7 @@ rIDAvailablePool: 133001-1073741823""", ["relax:0"]) res = self.ldb.load_partition_usn(self.base_dn) self.assertEquals(res["uSNHighest"], res["uSNUrgent"]) - # urgent replication should NOT be enabled when deleting + # urgent replication should NOT be enabled when deleting self.delete_force(self.ldb, "CN=RID Manager test,CN=System," + self.base_dn) res = self.ldb.load_partition_usn(self.base_dn) self.assertNotEquals(res["uSNHighest"], res["uSNUrgent"]) diff --git a/source4/lib/wmi/wmi.py b/source4/lib/wmi/wmi.py index fb86ba21154..4651c57c1b3 100644 --- a/source4/lib/wmi/wmi.py +++ b/source4/lib/wmi/wmi.py @@ -78,7 +78,7 @@ class IUnknown(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs): _wmi.IUnknown_swiginit(self, _wmi.new_IUnknown(*args, **kwargs)) __swig_destroy__ = _wmi.delete_IUnknown @@ -92,7 +92,7 @@ class IWbemServices(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs): _wmi.IWbemServices_swiginit(self, _wmi.new_IWbemServices(*args, **kwargs)) __swig_destroy__ = _wmi.delete_IWbemServices @@ -108,7 +108,7 @@ class IEnumWbemClassObject(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs): _wmi.IEnumWbemClassObject_swiginit(self, _wmi.new_IEnumWbemClassObject(*args, **kwargs)) __swig_destroy__ = _wmi.delete_IEnumWbemClassObject diff --git a/source4/torture/drs/python/linked_attributes_drs.py b/source4/torture/drs/python/linked_attributes_drs.py index 3a08a1a1b65..9a00892dd7a 100644 --- a/source4/torture/drs/python/linked_attributes_drs.py +++ b/source4/torture/drs/python/linked_attributes_drs.py @@ -117,7 +117,7 @@ class LATests(drs_base.DrsBaseTestCase): self.assertEqual(len(results), len(expected)) for k, v in results: - self.assertTrue(k in expected) + self.assertTrue(k in expected) self.assertEqual(expected[k], v, "%s active flag should be %d, not %d" % (k, expected[k], v)) diff --git a/wintest/test-s3.py b/wintest/test-s3.py index 71f5f775674..6e3cb9521d6 100755 --- a/wintest/test-s3.py +++ b/wintest/test-s3.py @@ -14,7 +14,7 @@ def set_libpath(t): def set_krb5_conf(t): t.run_cmd("mkdir -p ${PREFIX}/etc") - t.write_file("${PREFIX}/etc/krb5.conf", + t.write_file("${PREFIX}/etc/krb5.conf", '''[libdefaults] dns_lookup_realm = false dns_lookup_kdc = true''') diff --git a/wintest/wintest.py b/wintest/wintest.py index 166489aa037..4152069bbdf 100644 --- a/wintest/wintest.py +++ b/wintest/wintest.py @@ -894,7 +894,7 @@ RebootOnCompletion=No child.sendline("ipconfig /flushdns") child.expect("C:") child.sendline("netdom join ${WIN_HOSTNAME} /Domain:%s /UserD:%s /PasswordD:%s" % (domain, username, password)) - i = child.expect(["The command completed successfully", + i = child.expect(["The command completed successfully", "The specified domain either does not exist or could not be contacted."], timeout=120) if i == 0: break -- 2.34.1