Skip to content

Commit

Permalink
PEP8: fix W291: trailing whitespace
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Guo <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
Reviewed-by: Douglas Bagnall <[email protected]>
  • Loading branch information
catalyst-joe-guo authored and douglasbagnall committed Aug 24, 2018
1 parent 9f5bbcc commit aa243d1
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions examples/logon/ntlogon/ntlogon.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def run():

#
# open the configuration file
#
#
try:
iFile = open(configfile, 'r')
except IOError:
Expand All @@ -330,7 +330,7 @@ def run():

#
# open the output file
#
#
if not debug:
try:
oFile = open(outdir + outfile, 'w')
Expand Down
6 changes: 3 additions & 3 deletions python/examples/netbios.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

# Unix SMB/CIFS implementation.
# Copyright (C) Jelmer Vernooij <[email protected]> 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 <http://www.gnu.org/licenses/>.
#
Expand Down
6 changes: 3 additions & 3 deletions python/examples/samr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
# Copyright © Jelmer Vernooij <[email protected]> 2008
#
# Based on samr.js © Andrew Tridgell <[email protected]>
#
#
# 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 <http://www.gnu.org/licenses/>.
#
Expand Down
2 changes: 1 addition & 1 deletion python/examples/winreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
parser = optparse.OptionParser("%s <BINDING> [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()
Expand Down
8 changes: 4 additions & 4 deletions script/generate_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@


def iterate_all(path):
"""Iterate and yield all the parameters.
"""Iterate and yield all the parameters.
:param path: path to parameters xml file
"""
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion source4/dsdb/tests/python/acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ def test_search2(self):
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)
Expand Down
4 changes: 2 additions & 2 deletions source4/dsdb/tests/python/urgent_replication.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def test_classSchema_object(self):
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,
Expand Down Expand Up @@ -273,7 +273,7 @@ def test_rIDManager_object(self):
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"])
Expand Down
6 changes: 3 additions & 3 deletions source4/lib/wmi/wmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion source4/torture/drs/python/linked_attributes_drs.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def assert_forward_links(self, obj, expected, attr='member'):
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))

Expand Down
2 changes: 1 addition & 1 deletion wintest/test-s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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''')
Expand Down
2 changes: 1 addition & 1 deletion wintest/wintest.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ def run_winjoin(self, vm, domain, username="administrator", password="${PASSWORD
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
Expand Down

0 comments on commit aa243d1

Please sign in to comment.