1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-18 00:59:12 +03:00

PEP8: fix E202: whitespace before ')'

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:
Joe Guo
2018-07-30 18:17:02 +12:00
committed by Douglas Bagnall
parent a9551edaee
commit 562411bd95
47 changed files with 254 additions and 254 deletions

View File

@ -326,10 +326,10 @@ class Descriptor(object):
self_ace_fixed = "%s" % self.fix_sid(self_ace)
other_ace_fixed = "%s" % other.fix_sid(other_ace)
if self_ace_fixed != other_ace_fixed:
res += "%60s * %s\n" % (self_ace_fixed, other_ace_fixed )
res += "%60s * %s\n" % (self_ace_fixed, other_ace_fixed)
flag = False
else:
res += "%60s | %s\n" % (self_ace_fixed, other_ace_fixed )
res += "%60s | %s\n" % (self_ace_fixed, other_ace_fixed)
i += 1
return (flag, res)
@ -345,8 +345,8 @@ class Descriptor(object):
other_aces = []
self_dacl_list_fixed = []
other_dacl_list_fixed = []
[self_dacl_list_fixed.append(self.fix_sid(ace) ) for ace in self.dacl_list]
[other_dacl_list_fixed.append(other.fix_sid(ace) ) for ace in other.dacl_list]
[self_dacl_list_fixed.append(self.fix_sid(ace)) for ace in self.dacl_list]
[other_dacl_list_fixed.append(other.fix_sid(ace)) for ace in other.dacl_list]
for ace in self_dacl_list_fixed:
try:
other_dacl_list_fixed.index(ace)
@ -740,7 +740,7 @@ class LDAPBundel(object):
def __eq__(self, other):
res = True
if self.size != other.size:
self.log("\n* DN lists have different size: %s != %s" % (self.size, other.size) )
self.log("\n* DN lists have different size: %s != %s" % (self.size, other.size))
if not self.skip_missing_dn:
res = False
#
@ -752,10 +752,10 @@ class LDAPBundel(object):
for x in self.dn_list:
if not x.upper() in [q.upper() for q in other.dn_list]:
if title and not self.skip_missing_dn:
self.log(title )
self.log(title)
title = None
res = False
self.log(4*" " + x )
self.log(4*" " + x)
self.dn_list[self.dn_list.index(x)] = ""
self.dn_list = [x for x in self.dn_list if x]
#
@ -763,10 +763,10 @@ class LDAPBundel(object):
for x in other.dn_list:
if not x.upper() in [q.upper() for q in self.dn_list]:
if title and not self.skip_missing_dn:
self.log(title )
self.log(title)
title = None
res = False
self.log(4*" " + x )
self.log(4*" " + x)
other.dn_list[other.dn_list.index(x)] = ""
other.dn_list = [x for x in other.dn_list if x]
#
@ -774,7 +774,7 @@ class LDAPBundel(object):
other.update_size()
assert self.size == other.size
assert sorted([x.upper() for x in self.dn_list]) == sorted([x.upper() for x in other.dn_list])
self.log("\n* Objects to be compared: %s" % self.size )
self.log("\n* Objects to be compared: %s" % self.size)
index = 0
while index < self.size:
@ -788,7 +788,7 @@ class LDAPBundel(object):
except LdbError as e:
(enum, estr) = e.args
if enum == ERR_NO_SUCH_OBJECT:
self.log("\n!!! Object not found: %s" % self.dn_list[index] )
self.log("\n!!! Object not found: %s" % self.dn_list[index])
skip = True
raise
try:
@ -800,7 +800,7 @@ class LDAPBundel(object):
except LdbError as e1:
(enum, estr) = e1.args
if enum == ERR_NO_SUCH_OBJECT:
self.log("\n!!! Object not found: %s" % other.dn_list[index] )
self.log("\n!!! Object not found: %s" % other.dn_list[index])
skip = True
raise
if skip:
@ -808,16 +808,16 @@ class LDAPBundel(object):
continue
if object1 == object2:
if self.con.verbose:
self.log("\nComparing:" )
self.log("'%s' [%s]" % (object1.dn, object1.con.host) )
self.log("'%s' [%s]" % (object2.dn, object2.con.host) )
self.log(4*" " + "OK" )
self.log("\nComparing:")
self.log("'%s' [%s]" % (object1.dn, object1.con.host))
self.log("'%s' [%s]" % (object2.dn, object2.con.host))
self.log(4*" " + "OK")
else:
self.log("\nComparing:" )
self.log("'%s' [%s]" % (object1.dn, object1.con.host) )
self.log("'%s' [%s]" % (object2.dn, object2.con.host) )
self.log(object1.screen_output )
self.log(4*" " + "FAILED" )
self.log("\nComparing:")
self.log("'%s' [%s]" % (object1.dn, object1.con.host))
self.log("'%s' [%s]" % (object2.dn, object2.con.host))
self.log(object1.screen_output)
self.log(4*" " + "FAILED")
res = False
self.summary = object1.summary
other.summary = object2.summary
@ -870,12 +870,12 @@ class LDAPBundel(object):
self.summary["df_value_attrs"] = list(set(self.summary["df_value_attrs"]))
#
if self.summary["unique_attrs"]:
self.log("\nAttributes found only in %s:" % self.con.host )
self.log("".join([str("\n" + 4*" " + x) for x in self.summary["unique_attrs"]]) )
self.log("\nAttributes found only in %s:" % self.con.host)
self.log("".join([str("\n" + 4*" " + x) for x in self.summary["unique_attrs"]]))
#
if self.summary["df_value_attrs"]:
self.log("\nAttributes with different values:" )
self.log("".join([str("\n" + 4*" " + x) for x in self.summary["df_value_attrs"]]) )
self.log("\nAttributes with different values:")
self.log("".join([str("\n" + 4*" " + x) for x in self.summary["df_value_attrs"]]))
self.summary["df_value_attrs"] = []