summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Guo <joeg@catalyst.net.nz>2018-07-30 18:17:02 +1200
committerDouglas Bagnall <dbagnall@samba.org>2018-08-24 07:49:27 +0200
commit562411bd9587bdd011bd70e25f9763c38a8af401 (patch)
treec2a3f2753ead19a35df6259cb1be3dd28dda4473
parenta9551edaeebdb2e8c209a843bae7088e60946e96 (diff)
downloadsamba-562411bd9587bdd011bd70e25f9763c38a8af401.tar.gz
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>
-rwxr-xr-xlib/ldb-samba/tests/match_rules.py16
-rw-r--r--python/samba/dbchecker.py2
-rw-r--r--python/samba/join.py10
-rw-r--r--python/samba/netcmd/computer.py2
-rw-r--r--python/samba/netcmd/dbcheck.py2
-rw-r--r--python/samba/netcmd/dns.py34
-rw-r--r--python/samba/netcmd/drs.py2
-rw-r--r--python/samba/netcmd/gpo.py20
-rw-r--r--python/samba/netcmd/group.py2
-rw-r--r--python/samba/netcmd/ldapcmp.py50
-rw-r--r--python/samba/netcmd/ou.py2
-rw-r--r--python/samba/netcmd/schema.py2
-rw-r--r--python/samba/netcmd/user.py2
-rw-r--r--python/samba/provision/__init__.py8
-rw-r--r--python/samba/provision/backend.py16
-rw-r--r--python/samba/remove_dc.py4
-rw-r--r--python/samba/tests/password_hash_fl2003.py2
-rw-r--r--python/samba/tests/password_hash_fl2008.py2
-rw-r--r--python/samba/tests/s3idmapdb.py2
-rw-r--r--python/samba/tests/s3param.py2
-rw-r--r--python/samba/tests/s3passdb.py2
-rw-r--r--python/samba/tests/s3registry.py2
-rw-r--r--python/samba/tests/s3windb.py2
-rw-r--r--python/samba/tests/samba3sam.py2
-rw-r--r--python/samba/tests/samba_tool/dnscmd.py2
-rw-r--r--python/samba/tests/samba_tool/user.py2
-rw-r--r--python/samba/upgradehelpers.py2
-rwxr-xr-xscript/autobuild.py48
-rw-r--r--script/generate_param.py2
-rwxr-xr-xsource3/script/tests/test_wbinfo_sids2xids_int.py2
-rwxr-xr-xsource3/selftest/tests.py14
-rwxr-xr-xsource4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py2
-rwxr-xr-xsource4/dsdb/tests/python/acl.py36
-rwxr-xr-xsource4/dsdb/tests/python/deletetest.py12
-rwxr-xr-xsource4/dsdb/tests/python/dirsync.py18
-rwxr-xr-xsource4/dsdb/tests/python/ldap.py58
-rwxr-xr-xsource4/dsdb/tests/python/passwords.py12
-rwxr-xr-xsource4/dsdb/tests/python/sam.py20
-rwxr-xr-xsource4/dsdb/tests/python/sec_descriptor.py26
-rwxr-xr-xsource4/dsdb/tests/python/tombstone_reanimation.py6
-rwxr-xr-xsource4/dsdb/tests/python/user_account_control.py2
-rwxr-xr-xsource4/scripting/devel/speedtest.py18
-rwxr-xr-xsource4/selftest/tests.py2
-rw-r--r--source4/torture/drs/python/repl_rodc.py6
-rwxr-xr-xwintest/test-s3.py4
-rwxr-xr-xwintest/test-s4-howto.py22
-rw-r--r--wintest/wintest.py2
47 files changed, 254 insertions, 254 deletions
diff --git a/lib/ldb-samba/tests/match_rules.py b/lib/ldb-samba/tests/match_rules.py
index 63dfddb2010..dde787ff68b 100755
--- a/lib/ldb-samba/tests/match_rules.py
+++ b/lib/ldb-samba/tests/match_rules.py
@@ -97,16 +97,16 @@ class MatchRulesTests(samba.tests.TestCase):
# Add four groups
self.ldb.add({
"dn": "cn=g1,%s" % self.ou_groups,
- "objectclass": "group" })
+ "objectclass": "group"})
self.ldb.add({
"dn": "cn=g2,%s" % self.ou_groups,
- "objectclass": "group" })
+ "objectclass": "group"})
self.ldb.add({
"dn": "cn=g4,%s" % self.ou_groups,
- "objectclass": "group" })
+ "objectclass": "group"})
self.ldb.add({
"dn": "cn=g3,%s" % self.ou_groups,
- "objectclass": "group" })
+ "objectclass": "group"})
# Add four users
self.ldb.add({
@@ -972,16 +972,16 @@ class MatchRuleConditionTests(samba.tests.TestCase):
self.ldb.add({
"dn": "cn=g1,%s" % self.ou_groups,
- "objectclass": "group" })
+ "objectclass": "group"})
self.ldb.add({
"dn": "cn=g2,%s" % self.ou_groups,
- "objectclass": "group" })
+ "objectclass": "group"})
self.ldb.add({
"dn": "cn=g3,%s" % self.ou_groups,
- "objectclass": "group" })
+ "objectclass": "group"})
self.ldb.add({
"dn": "cn=g4,%s" % self.ou_groups,
- "objectclass": "group" })
+ "objectclass": "group"})
self.ldb.add({
"dn": "cn=u1,%s" % self.ou_users,
diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py
index a6c9d17af70..843649fa5db 100644
--- a/python/samba/dbchecker.py
+++ b/python/samba/dbchecker.py
@@ -2225,7 +2225,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
set_attrs_seen.add(str(attrname).lower())
if syntax_oid in [dsdb.DSDB_SYNTAX_BINARY_DN, dsdb.DSDB_SYNTAX_OR_NAME,
- dsdb.DSDB_SYNTAX_STRING_DN, ldb.SYNTAX_DN ]:
+ dsdb.DSDB_SYNTAX_STRING_DN, ldb.SYNTAX_DN]:
# it's some form of DN, do specialised checking on those
error_count += self.check_dn(obj, attrname, syntax_oid)
else:
diff --git a/python/samba/join.py b/python/samba/join.py
index f427275f39e..92061c38b23 100644
--- a/python/samba/join.py
+++ b/python/samba/join.py
@@ -145,7 +145,7 @@ class DCJoinContext(object):
ctx.SPNs = ["HOST/%s" % ctx.myname,
"HOST/%s" % ctx.dnshostname,
- "GC/%s/%s" % (ctx.dnshostname, ctx.dnsforest) ]
+ "GC/%s/%s" % (ctx.dnshostname, ctx.dnsforest)]
res_rid_manager = ctx.samdb.search(scope=ldb.SCOPE_BASE,
attrs=["rIDManagerReference"],
@@ -541,7 +541,7 @@ class DCJoinContext(object):
"systemFlags" : str(samba.dsdb.SYSTEM_FLAG_DISALLOW_MOVE_ON_DELETE),
"dMDLocation" : ctx.schema_dn}
- nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn ]
+ nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn]
if ctx.behavior_version >= samba.dsdb.DS_DOMAIN_FUNCTION_2003:
rec["msDS-Behavior-Version"] = str(samba.dsdb.DS_DOMAIN_FUNCTION_2008_R2)
@@ -1369,8 +1369,8 @@ class DCJoinContext(object):
# full_nc_list is the list of naming context (NC) we hold
# read/write copies of. These are not subsets of each other.
- ctx.nc_list = [ctx.config_dn, ctx.schema_dn ]
- ctx.full_nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn ]
+ ctx.nc_list = [ctx.config_dn, ctx.schema_dn]
+ ctx.full_nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn]
if ctx.subdomain and ctx.dns_backend != "NONE":
ctx.full_nc_list += [ctx.domaindns_zone]
@@ -1453,7 +1453,7 @@ def join_RODC(logger=None, server=None, creds=None, lp=None, site=None, netbios_
samba.dsdb.UF_PARTIAL_SECRETS_ACCOUNT)
ctx.SPNs.extend(["RestrictedKrbHost/%s" % ctx.myname,
- "RestrictedKrbHost/%s" % ctx.dnshostname ])
+ "RestrictedKrbHost/%s" % ctx.dnshostname])
ctx.connection_dn = "CN=RODC Connection (FRS),%s" % ctx.ntds_dn
ctx.secure_channel_type = misc.SEC_CHAN_RODC
diff --git a/python/samba/netcmd/computer.py b/python/samba/netcmd/computer.py
index 58ec053903a..977c3c42164 100644
--- a/python/samba/netcmd/computer.py
+++ b/python/samba/netcmd/computer.py
@@ -531,7 +531,7 @@ class cmd_computer_move(Command):
type=str, metavar="URL", dest="H"),
]
- takes_args = ["computername", "new_ou_dn" ]
+ takes_args = ["computername", "new_ou_dn"]
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"credopts": options.CredentialsOptions,
diff --git a/python/samba/netcmd/dbcheck.py b/python/samba/netcmd/dbcheck.py
index 6d4efaaa41a..4e5e78d5668 100644
--- a/python/samba/netcmd/dbcheck.py
+++ b/python/samba/netcmd/dbcheck.py
@@ -108,7 +108,7 @@ class cmd_dbcheck(Command):
samdb_schema = SamDB(session_info=system_session(), url=None,
credentials=creds, lp=lp)
- scope_map = {"SUB": ldb.SCOPE_SUBTREE, "BASE": ldb.SCOPE_BASE, "ONE":ldb.SCOPE_ONELEVEL }
+ scope_map = {"SUB": ldb.SCOPE_SUBTREE, "BASE": ldb.SCOPE_BASE, "ONE":ldb.SCOPE_ONELEVEL}
scope = scope.upper()
if not scope in scope_map:
raise CommandError("Unknown scope %s" % scope)
diff --git a/python/samba/netcmd/dns.py b/python/samba/netcmd/dns.py
index 65e545b2cc1..cc65c9236df 100644
--- a/python/samba/netcmd/dns.py
+++ b/python/samba/netcmd/dns.py
@@ -86,44 +86,44 @@ def bitmap_string(module, bitmap_defs, value):
def boot_method_string(boot_method):
enum_defs = ['DNS_BOOT_METHOD_UNINITIALIZED', 'DNS_BOOT_METHOD_FILE',
- 'DNS_BOOT_METHOD_REGISTRY', 'DNS_BOOT_METHOD_DIRECTORY' ]
+ 'DNS_BOOT_METHOD_REGISTRY', 'DNS_BOOT_METHOD_DIRECTORY']
return enum_string(dnsserver, enum_defs, boot_method)
def name_check_flag_string(check_flag):
enum_defs = ['DNS_ALLOW_RFC_NAMES_ONLY', 'DNS_ALLOW_NONRFC_NAMES',
- 'DNS_ALLOW_MULTIBYTE_NAMES', 'DNS_ALLOW_ALL_NAMES' ]
+ 'DNS_ALLOW_MULTIBYTE_NAMES', 'DNS_ALLOW_ALL_NAMES']
return enum_string(dnsserver, enum_defs, check_flag)
def zone_type_string(zone_type):
enum_defs = ['DNS_ZONE_TYPE_CACHE', 'DNS_ZONE_TYPE_PRIMARY',
'DNS_ZONE_TYPE_SECONDARY', 'DNS_ZONE_TYPE_STUB',
- 'DNS_ZONE_TYPE_FORWARDER', 'DNS_ZONE_TYPE_SECONDARY_CACHE' ]
+ 'DNS_ZONE_TYPE_FORWARDER', 'DNS_ZONE_TYPE_SECONDARY_CACHE']
return enum_string(dnsp, enum_defs, zone_type)
def zone_update_string(zone_update):
enum_defs = ['DNS_ZONE_UPDATE_OFF', 'DNS_ZONE_UPDATE_UNSECURE',
- 'DNS_ZONE_UPDATE_SECURE' ]
+ 'DNS_ZONE_UPDATE_SECURE']
return enum_string(dnsp, enum_defs, zone_update)
def zone_secondary_security_string(security):
enum_defs = ['DNS_ZONE_SECSECURE_NO_SECURITY', 'DNS_ZONE_SECSECURE_NS_ONLY',
- 'DNS_ZONE_SECSECURE_LIST_ONLY', 'DNS_ZONE_SECSECURE_NO_XFER' ]
+ 'DNS_ZONE_SECSECURE_LIST_ONLY', 'DNS_ZONE_SECSECURE_NO_XFER']
return enum_string(dnsserver, enum_defs, security)
def zone_notify_level_string(notify_level):
enum_defs = ['DNS_ZONE_NOTIFY_OFF', 'DNS_ZONE_NOTIFY_ALL_SECONDARIES',
- 'DNS_ZONE_NOTIFY_LIST_ONLY' ]
+ 'DNS_ZONE_NOTIFY_LIST_ONLY']
return enum_string(dnsserver, enum_defs, notify_level)
def dp_flags_string(dp_flags):
bitmap_defs = ['DNS_DP_AUTOCREATED', 'DNS_DP_LEGACY', 'DNS_DP_DOMAIN_DEFAULT',
- 'DNS_DP_FOREST_DEFAULT', 'DNS_DP_ENLISTED', 'DNS_DP_DELETED' ]
+ 'DNS_DP_FOREST_DEFAULT', 'DNS_DP_ENLISTED', 'DNS_DP_DELETED']
return bitmap_string(dnsserver, bitmap_defs, dp_flags)
@@ -538,7 +538,7 @@ class cmd_serverinfo(Command):
synopsis = '%prog <server> [options]'
- takes_args = ['server' ]
+ takes_args = ['server']
takes_optiongroups = {
"sambaopts": options.SambaOptions,
@@ -570,7 +570,7 @@ class cmd_zoneinfo(Command):
synopsis = '%prog <server> <zone> [options]'
- takes_args = ['server', 'zone' ]
+ takes_args = ['server', 'zone']
takes_optiongroups = {
"sambaopts": options.SambaOptions,
@@ -602,7 +602,7 @@ class cmd_zonelist(Command):
synopsis = '%prog <server> [options]'
- takes_args = ['server' ]
+ takes_args = ['server']
takes_optiongroups = {
"sambaopts": options.SambaOptions,
@@ -681,7 +681,7 @@ class cmd_zonecreate(Command):
synopsis = '%prog <server> <zone> [options]'
- takes_args = ['server', 'zone' ]
+ takes_args = ['server', 'zone']
takes_optiongroups = {
"sambaopts": options.SambaOptions,
@@ -758,7 +758,7 @@ class cmd_zonedelete(Command):
synopsis = '%prog <server> <zone> [options]'
- takes_args = ['server', 'zone' ]
+ takes_args = ['server', 'zone']
takes_optiongroups = {
"sambaopts": options.SambaOptions,
@@ -792,7 +792,7 @@ class cmd_query(Command):
synopsis = '%prog <server> <zone> <name> <A|AAAA|CNAME|MX|NS|SOA|SRV|TXT|ALL> [options]'
- takes_args = ['server', 'zone', 'name', 'rtype' ]
+ takes_args = ['server', 'zone', 'name', 'rtype']
takes_optiongroups = {
"sambaopts": options.SambaOptions,
@@ -872,7 +872,7 @@ class cmd_roothints(Command):
synopsis = '%prog <server> [<name>] [options]'
- takes_args = ['server', 'name?' ]
+ takes_args = ['server', 'name?']
takes_optiongroups = {
"sambaopts": options.SambaOptions,
@@ -912,7 +912,7 @@ class cmd_add_record(Command):
synopsis = '%prog <server> <zone> <name> <A|AAAA|PTR|CNAME|NS|MX|SRV|TXT> <data>'
- takes_args = ['server', 'zone', 'name', 'rtype', 'data' ]
+ takes_args = ['server', 'zone', 'name', 'rtype', 'data']
takes_optiongroups = {
"sambaopts": options.SambaOptions,
@@ -964,7 +964,7 @@ class cmd_update_record(Command):
synopsis = '%prog <server> <zone> <name> <A|AAAA|PTR|CNAME|NS|MX|SOA|SRV|TXT> <olddata> <newdata>'
- takes_args = ['server', 'zone', 'name', 'rtype', 'olddata', 'newdata' ]
+ takes_args = ['server', 'zone', 'name', 'rtype', 'olddata', 'newdata']
takes_optiongroups = {
"sambaopts": options.SambaOptions,
@@ -1034,7 +1034,7 @@ class cmd_delete_record(Command):
synopsis = '%prog <server> <zone> <name> <A|AAAA|PTR|CNAME|NS|MX|SRV|TXT> <data>'
- takes_args = ['server', 'zone', 'name', 'rtype', 'data' ]
+ takes_args = ['server', 'zone', 'name', 'rtype', 'data']
takes_optiongroups = {
"sambaopts": options.SambaOptions,
diff --git a/python/samba/netcmd/drs.py b/python/samba/netcmd/drs.py
index 5a17aa3d24a..12cfee02d81 100644
--- a/python/samba/netcmd/drs.py
+++ b/python/samba/netcmd/drs.py
@@ -688,7 +688,7 @@ class cmd_drs_options(Command):
takes_options = [
Option("--dsa-option", help="DSA option to enable/disable", type="str",
- metavar="{+|-}IS_GC | {+|-}DISABLE_INBOUND_REPL | {+|-}DISABLE_OUTBOUND_REPL | {+|-}DISABLE_NTDSCONN_XLATE" ),
+ metavar="{+|-}IS_GC | {+|-}DISABLE_INBOUND_REPL | {+|-}DISABLE_OUTBOUND_REPL | {+|-}DISABLE_NTDSCONN_XLATE"),
]
option_map = {"IS_GC": 0x00000001,
diff --git a/python/samba/netcmd/gpo.py b/python/samba/netcmd/gpo.py
index d0777c4b5c3..f3e17610ead 100644
--- a/python/samba/netcmd/gpo.py
+++ b/python/samba/netcmd/gpo.py
@@ -308,8 +308,8 @@ attr_flags = smb.FILE_ATTRIBUTE_SYSTEM | \
def copy_directory_remote_to_local(conn, remotedir, localdir):
if not os.path.isdir(localdir):
os.mkdir(localdir)
- r_dirs = [remotedir ]
- l_dirs = [localdir ]
+ r_dirs = [remotedir]
+ l_dirs = [localdir]
while r_dirs:
r_dir = r_dirs.pop()
l_dir = l_dirs.pop()
@@ -333,8 +333,8 @@ def copy_directory_local_to_remote(conn, localdir, remotedir,
ignore_existing=False):
if not conn.chkpath(remotedir):
conn.mkdir(remotedir)
- l_dirs = [localdir ]
- r_dirs = [remotedir ]
+ l_dirs = [localdir]
+ r_dirs = [remotedir]
while l_dirs:
l_dir = l_dirs.pop()
r_dir = r_dirs.pop()
@@ -445,7 +445,7 @@ class cmd_list(Command):
raise CommandError("Failed to find objectClass for user %s" % username)
session_info_flags = (AUTH_SESSION_INFO_DEFAULT_GROUPS |
- AUTH_SESSION_INFO_AUTHENTICATED )
+ AUTH_SESSION_INFO_AUTHENTICATED)
# When connecting to a remote server, don't look up the local privilege DB
if self.url is not None and self.url.startswith('ldap'):
@@ -680,10 +680,10 @@ class cmd_setlink(Command):
if found:
raise CommandError("GPO '%s' already linked to this container" % gpo)
else:
- gplist.insert(0, {'dn' : gpo_dn, 'options' : gplink_options })
+ gplist.insert(0, {'dn' : gpo_dn, 'options' : gplink_options})
else:
gplist = []
- gplist.append({'dn' : gpo_dn, 'options' : gplink_options })
+ gplist.append({'dn' : gpo_dn, 'options' : gplink_options})
gplink_str = encode_gplink(gplist)
@@ -834,7 +834,7 @@ class cmd_setinheritance(Command):
"credopts": options.CredentialsOptions,
}
- takes_args = ['container_dn', 'inherit_state' ]
+ takes_args = ['container_dn', 'inherit_state']
takes_options = [
Option("-H", help="LDB URL for database or target server", type=str)
@@ -1220,7 +1220,7 @@ class cmd_create(Command):
# Get new security descriptor
ds_sd_flags = (security.SECINFO_OWNER |
security.SECINFO_GROUP |
- security.SECINFO_DACL )
+ security.SECINFO_DACL)
msg = get_gpo_info(self.samdb, gpo=gpo, sd_flags=ds_sd_flags)[0]
ds_sd_ndr = msg['nTSecurityDescriptor'][0]
ds_sd = ndr_unpack(security.descriptor, ds_sd_ndr).as_sddl()
@@ -1237,7 +1237,7 @@ class cmd_create(Command):
sio = (security.SECINFO_OWNER |
security.SECINFO_GROUP |
security.SECINFO_DACL |
- security.SECINFO_PROTECTED_DACL )
+ security.SECINFO_PROTECTED_DACL)
conn.set_acl(sharepath, fs_sd, sio)
# Copy GPO files over SMB
diff --git a/python/samba/netcmd/group.py b/python/samba/netcmd/group.py
index d876259700e..a4ec6338144 100644
--- a/python/samba/netcmd/group.py
+++ b/python/samba/netcmd/group.py
@@ -459,7 +459,7 @@ class cmd_group_move(Command):
type=str, metavar="URL", dest="H"),
]
- takes_args = ["groupname", "new_parent_dn" ]
+ takes_args = ["groupname", "new_parent_dn"]
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"credopts": options.CredentialsOptions,
diff --git a/python/samba/netcmd/ldapcmp.py b/python/samba/netcmd/ldapcmp.py
index e987dec1d4c..1f662d57ae3 100644
--- a/python/samba/netcmd/ldapcmp.py
+++ b/python/samba/netcmd/ldapcmp.py
@@ -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"] = []
diff --git a/python/samba/netcmd/ou.py b/python/samba/netcmd/ou.py
index a34be62f479..3a3a161a73b 100644
--- a/python/samba/netcmd/ou.py
+++ b/python/samba/netcmd/ou.py
@@ -233,7 +233,7 @@ class cmd_listobjects(Command):
action='store_true', help="List objects recursively."),
]
- takes_args = ["ou_dn" ]
+ takes_args = ["ou_dn"]
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"credopts": options.CredentialsOptions,
diff --git a/python/samba/netcmd/schema.py b/python/samba/netcmd/schema.py
index 733d40c253b..aeb947ee723 100644
--- a/python/samba/netcmd/schema.py
+++ b/python/samba/netcmd/schema.py
@@ -99,7 +99,7 @@ class cmd_schema_attribute_modify(Command):
flags = searchflags.split(',')
# We have to normalise all the values. To achieve this predictably
# we title case (Fattrindex), then swapcase (fATTINDEX)
- flags = [x.capitalize().swapcase() for x in flags ]
+ flags = [x.capitalize().swapcase() for x in flags]
for flag in flags:
if flag not in bitFields['searchflags'].keys():
raise CommandError("Unknown flag '%s', please see --help" % flag)
diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py
index 94040217f4f..6bad53eb2c4 100644
--- a/python/samba/netcmd/user.py
+++ b/python/samba/netcmd/user.py
@@ -2544,7 +2544,7 @@ class cmd_user_move(Command):
type=str, metavar="URL", dest="H"),
]
- takes_args = ["username", "new_parent_dn" ]
+ takes_args = ["username", "new_parent_dn"]
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"credopts": options.CredentialsOptions,
diff --git a/python/samba/provision/__init__.py b/python/samba/provision/__init__.py
index fd7c9fd38e2..815df774e18 100644
--- a/python/samba/provision/__init__.py
+++ b/python/samba/provision/__init__.py
@@ -275,7 +275,7 @@ def find_provision_key_parameters(samdb, secretsdb, idmapdb, paths, smbconf,
# domain guid/sid
res6 = samdb.search(expression="(objectClass=*)", base=basedn,
scope=ldb.SCOPE_BASE, attrs=["objectGUID",
- "objectSid","msDS-Behavior-Version" ])
+ "objectSid","msDS-Behavior-Version"])
names.domainguid = str(ndr_unpack(misc.GUID, res6[0]["objectGUID"][0]))
names.domainsid = ndr_unpack(security.dom_sid, res6[0]["objectSid"][0])
names.forestsid = ndr_unpack(security.dom_sid, res6[0]["objectSid"][0])
@@ -978,11 +978,11 @@ def secretsdb_self_join(secretsdb, domain,
secretsdb.modify(msg)
secretsdb.rename(res[0].dn, msg.dn)
else:
- spn = ['HOST/%s' % shortname ]
+ spn = ['HOST/%s' % shortname]
if secure_channel_type == SEC_CHAN_BDC and dnsname is not None:
# we are a domain controller then we add servicePrincipalName
# entries for the keytab code to update.
- spn.extend(['HOST/%s' % dnsname ])
+ spn.extend(['HOST/%s' % dnsname])
msg["servicePrincipalName"] = spn
secretsdb.add(msg)
@@ -1973,7 +1973,7 @@ def provision_fill(samdb, secrets_ldb, logger, names, paths,
logger.info("Setting up sam.ldb rootDSE marking as synchronized")
setup_modify_ldif(samdb, setup_path("provision_rootdse_modify.ldif"),
- {'NTDSGUID' : names.ntdsguid })
+ {'NTDSGUID' : names.ntdsguid})
# fix any dangling GUIDs from the provision
logger.info("Fixing provision GUIDs")
diff --git a/python/samba/provision/backend.py b/python/samba/provision/backend.py
index bb65834166c..b8b7e509773 100644
--- a/python/samba/provision/backend.py
+++ b/python/samba/provision/backend.py
@@ -417,7 +417,7 @@ class OpenLDAPBackend(LDAPBackend):
mmr_serverids_config += read_and_sub_file(
setup_path("mmr_serverids.conf"), {
"SERVERID": str(serverid),
- "LDAPSERVER": url })
+ "LDAPSERVER": url})
rid = serverid * 10
rid = rid + 1
mmr_syncrepl_schema_config += read_and_sub_file(
@@ -457,7 +457,7 @@ class OpenLDAPBackend(LDAPBackend):
"RID" : str(rid),
"MMRDN": self.names.domaindn,
"LDAPSERVER" : url,
- "MMR_PASSWORD": mmr_pass })
+ "MMR_PASSWORD": mmr_pass})
# OpenLDAP cn=config initialisation
olc_syncrepl_config = ""
olc_mmr_config = ""
@@ -474,7 +474,7 @@ class OpenLDAPBackend(LDAPBackend):
serverid = serverid + 1
olc_serverids_config += read_and_sub_file(
setup_path("olc_serverid.conf"), {
- "SERVERID" : str(serverid), "LDAPSERVER" : url })
+ "SERVERID" : str(serverid), "LDAPSERVER" : url})
rid = rid + 1
olc_syncrepl_config += read_and_sub_file(
@@ -530,7 +530,7 @@ class OpenLDAPBackend(LDAPBackend):
setup_path("cn=samba.ldif"),
{"LDAPADMINPASS": self.ldapadminpass,
"MMR_PASSWORD": mmr_pass,
- "MMR": mmr })
+ "MMR": mmr})
mapping = "schema-map-openldap-2.3"
backend_schema = "backend-schema.schema"
@@ -718,13 +718,13 @@ class FDSBackend(LDAPBackend):
refint_config += read_and_sub_file(
setup_path("fedorads-refint-add.ldif"),
{"ARG_NUMBER" : str(argnum),
- "LINK_ATTR" : attr })
+ "LINK_ATTR" : attr})
memberof_config += read_and_sub_file(
setup_path("fedorads-linked-attributes.ldif"),
{"MEMBER_ATTR" : attr,
- "MEMBEROF_ATTR" : lnkattr[attr] })
+ "MEMBEROF_ATTR" : lnkattr[attr]})
index_config += read_and_sub_file(
- setup_path("fedorads-index.ldif"), {"ATTR" : attr })
+ setup_path("fedorads-index.ldif"), {"ATTR" : attr})
argnum += 1
f = open(self.refint_ldif, 'w')
@@ -751,7 +751,7 @@ class FDSBackend(LDAPBackend):
attr = "nsUniqueId"
index_config += read_and_sub_file(
- setup_path("fedorads-index.ldif"), {"ATTR" : attr })
+ setup_path("fedorads-index.ldif"), {"ATTR" : attr})
f = open(self.index_ldif, 'w')
try:
diff --git a/python/samba/remove_dc.py b/python/samba/remove_dc.py
index baf088010fd..12fefbed0f6 100644
--- a/python/samba/remove_dc.py
+++ b/python/samba/remove_dc.py
@@ -156,7 +156,7 @@ def remove_dns_references(samdb, logger, dnsHostName, ignore_no_name=False):
raise DemoteException("lookup of %s failed: %s" % (a_name, estr))
orig_num_recs = len(a_recs)
- a_recs = [r for r in a_recs if not a_rec_to_remove(r) ]
+ a_recs = [r for r in a_recs if not a_rec_to_remove(r)]
if len(a_recs) != orig_num_recs:
logger.info("updating %s keeping %d values, removing %s values" % \
@@ -197,7 +197,7 @@ def remove_hanging_dns_references(samdb, logger, dnsHostNameUpper, zones):
# Remove references to dnsHostName in A, AAAA, NS, CNAME and SRV
values = [ndr_unpack(dnsp.DnssrvRpcRecord, v)
- for v in orig_values if not to_remove(v) ]
+ for v in orig_values if not to_remove(v)]
if len(values) != len(orig_values):
logger.info("updating %s keeping %d values, removing %s values" \
diff --git a/python/samba/tests/password_hash_fl2003.py b/python/samba/tests/password_hash_fl2003.py
index 0ac38b05f48..e1a7ec94452 100644
--- a/python/samba/tests/password_hash_fl2003.py
+++ b/python/samba/tests/password_hash_fl2003.py
@@ -197,5 +197,5 @@ class PassWordHashFl2003Tests(PassWordHashTests):
#
up = ndr_unpack(drsblobs.package_PrimaryUserPasswordBlob,
binascii.a2b_hex(up_package.data))
- self.checkUserPassword(up, [("{CRYPT}", "6",10000 )])
+ self.checkUserPassword(up, [("{CRYPT}", "6",10000)])
self.checkNtHash(USER_PASS, up.current_nt_hash.hash)
diff --git a/python/samba/tests/password_hash_fl2008.py b/python/samba/tests/password_hash_fl2008.py
index 7904628c613..70455a6e9d8 100644
--- a/python/samba/tests/password_hash_fl2008.py
+++ b/python/samba/tests/password_hash_fl2008.py
@@ -206,5 +206,5 @@ class PassWordHashFl2008Tests(PassWordHashTests):
#
up = ndr_unpack(drsblobs.package_PrimaryUserPasswordBlob,
binascii.a2b_hex(up_package.data))
- self.checkUserPassword(up, [("{CRYPT}", "5",100 )])
+ self.checkUserPassword(up, [("{CRYPT}", "5",100)])
self.checkNtHash(USER_PASS, up.current_nt_hash.hash)
diff --git a/python/samba/tests/s3idmapdb.py b/python/samba/tests/s3idmapdb.py
index 9386a4c8111..cda4b3154ba 100644
--- a/python/samba/tests/s3idmapdb.py
+++ b/python/samba/tests/s3idmapdb.py
@@ -22,7 +22,7 @@ from samba.tests import TestCase, TestCaseInTempDir
from samba.dcerpc.security import dom_sid
import os
-for p in ["../../../../../testdata/samba3", "../../../../testdata/samba3" ]:
+for p in ["../../../../../testdata/samba3", "../../../../testdata/samba3"]:
DATADIR = os.path.join(os.path.dirname(__file__), p)
if os.path.exists(DATADIR):
break
diff --git a/python/samba/tests/s3param.py b/python/samba/tests/s3param.py
index 77c9399ff0a..d92d35488e0 100644
--- a/python/samba/tests/s3param.py
+++ b/python/samba/tests/s3param.py
@@ -22,7 +22,7 @@ from samba.tests import TestCase, TestCaseInTempDir
import os
-for p in ["../../../../../testdata/samba3", "../../../../testdata/samba3" ]:
+for p in ["../../../../../testdata/samba3", "../../../../testdata/samba3"]:
DATADIR = os.path.join(os.path.dirname(__file__), p)
if os.path.exists(DATADIR):
break
diff --git a/python/samba/tests/s3passdb.py b/python/samba/tests/s3passdb.py
index 04a0ae272e5..329614783ae 100644
--- a/python/samba/tests/s3passdb.py
+++ b/python/samba/tests/s3passdb.py
@@ -24,7 +24,7 @@ from samba.dcerpc.security import dom_sid
import os
-for p in ["../../../../../testdata/samba3", "../../../../testdata/samba3" ]:
+for p in ["../../../../../testdata/samba3", "../../../../testdata/samba3"]:
DATADIR = os.path.join(os.path.dirname(__file__), p)
if os.path.exists(DATADIR):
break
diff --git a/python/samba/tests/s3registry.py b/python/samba/tests/s3registry.py
index e33b0495b4a..c64f181b895 100644
--- a/python/samba/tests/s3registry.py
+++ b/python/samba/tests/s3registry.py
@@ -23,7 +23,7 @@ from samba.dcerpc.security import dom_sid
import os
-for p in ["../../../../../testdata/samba3", "../../../../testdata/samba3" ]:
+for p in ["../../../../../testdata/samba3", "../../../../testdata/samba3"]:
DATADIR = os.path.join(os.path.dirname(__file__), p)
if os.path.exists(DATADIR):
break
diff --git a/python/samba/tests/s3windb.py b/python/samba/tests/s3windb.py
index bf2b90523b5..9a41c804e13 100644
--- a/python/samba/tests/s3windb.py
+++ b/python/samba/tests/s3windb.py
@@ -22,7 +22,7 @@ from samba.tests import TestCase, TestCaseInTempDir
import os
-for p in ["../../../../../testdata/samba3", "../../../../testdata/samba3" ]:
+for p in ["../../../../../testdata/samba3", "../../../../testdata/samba3"]:
DATADIR = os.path.join(os.path.dirname(__file__), p)
if os.path.exists(DATADIR):
break
diff --git a/python/samba/tests/samba3sam.py b/python/samba/tests/samba3sam.py
index f10fbd8fdda..c8f4fb026a8 100644
--- a/python/samba/tests/samba3sam.py
+++ b/python/samba/tests/samba3sam.py
@@ -34,7 +34,7 @@ from operator import attrgetter
def read_datafile(filename):
paths = ["../../../../../testdata/samba3",
- "../../../../testdata/samba3" ]
+ "../../../../testdata/samba3"]
for p in paths:
datadir = os.path.join(os.path.dirname(__file__), p)
if os.path.exists(datadir):
diff --git a/python/samba/tests/samba_tool/dnscmd.py b/python/samba/tests/samba_tool/dnscmd.py
index c44a3083716..913cd7cf5ba 100644
--- a/python/samba/tests/samba_tool/dnscmd.py
+++ b/python/samba/tests/samba_tool/dnscmd.py
@@ -67,7 +67,7 @@ class DnsCmdTestCase(SambaToolCmdTest):
good_srv = ["SAMDOM.EXAMPLE.COM 65530 65530 65530"]
bad_srv = ["SAMDOM.EXAMPLE.COM 0 65536 0",
"SAMDOM.EXAMPLE.COM 0 0 65536",
- "SAMDOM.EXAMPLE.COM 65536 0 0" ]
+ "SAMDOM.EXAMPLE.COM 65536 0 0"]
for bad_dn in bad_dns:
bad_mx.append("%s 1" % bad_dn)
diff --git a/python/samba/tests/samba_tool/user.py b/python/samba/tests/samba_tool/user.py
index 584d1a60e10..e219d68aaba 100644
--- a/python/samba/tests/samba_tool/user.py
+++ b/python/samba/tests/samba_tool/user.py
@@ -205,7 +205,7 @@ class UserCmdTestCase(SambaToolCmdTest):
self.assertCmdSuccess(result, out, err, "Ensure syncpasswords --cache-ldb-initialize runs")
self.assertEqual(err,"","getpassword without url")
cache_attrs = {
- "objectClass": {"value": "userSyncPasswords" },
+ "objectClass": {"value": "userSyncPasswords"},
"samdbUrl": {},
"dirsyncFilter": {},
"dirsyncAttribute": {},
diff --git a/python/samba/upgradehelpers.py b/python/samba/upgradehelpers.py
index 2c4e986d01a..c560f9ae31d 100644
--- a/python/samba/upgradehelpers.py
+++ b/python/samba/upgradehelpers.py
@@ -451,7 +451,7 @@ def updateOEMInfo(samdb, rootdn):
delta = ldb.Message()
delta.dn = ldb.Dn(samdb, str(res[0]["dn"]))
delta["oEMInformation"] = ldb.MessageElement(info, ldb.FLAG_MOD_REPLACE,
- "oEMInformation" )
+ "oEMInformation")
samdb.modify(delta)
def update_gpo(paths, samdb, names, lp, message):
diff --git a/script/autobuild.py b/script/autobuild.py
index ed4afdcbc21..f52821915cb 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -69,7 +69,7 @@ defaulttasks = ["ctdb",
"talloc",
"replace",
"tevent",
- "pidl" ]
+ "pidl"]
if os.environ.get("AUTOBUILD_SKIP_SAMBA_O3", "0") == "1":
defaulttasks.remove("samba-o3")
@@ -97,7 +97,7 @@ tasks = {
("install", "make install", "text/plain"),
("test", "make autotest", "text/plain"),
("check-clean-tree", "../script/clean-source-tree.sh", "text/plain"),
- ("clean", "make clean", "text/plain") ],
+ ("clean", "make clean", "text/plain")],
# We have 'test' before 'install' because, 'test' should work without 'install (runs ad_dc_ntvfs and all the other envs)'
"samba" : [("configure", "./configure.developer --with-selftest-prefix=./bin/ab" + samba_configure_params, "text/plain"),
@@ -119,7 +119,7 @@ tasks = {
"text/plain"),
("install", "make install", "text/plain"),
("check-clean-tree", "script/clean-source-tree.sh", "text/plain"),
- ("clean", "make clean", "text/plain") ],
+ ("clean", "make clean", "text/plain")],
# We split out this so the isolated nt4_dc tests do not wait for ad_dc or ad_dc_ntvfs tests (which are long)
"samba-nt4" : [("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),
@@ -128,7 +128,7 @@ tasks = {
("test", "make test FAIL_IMMEDIATELY=1 TESTS='--include-env=nt4_dc --include-env=nt4_member'", "text/plain"),
("install", "make install", "text/plain"),
("check-clean-tree", "script/clean-source-tree.sh", "text/plain"),
- ("clean", "make clean", "text/plain") ],
+ ("clean", "make clean", "text/plain")],
# We split out this so the isolated ad_dc tests do not wait for ad_dc_ntvfs tests (which are long)
"samba-fileserver" : [("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),
@@ -159,7 +159,7 @@ tasks = {
"samba-test-only" : [("configure", "./configure.developer --with-selftest-prefix=./bin/ab --abi-check-disable" + samba_configure_params, "text/plain"),
("make", "make -j", "text/plain"),
- ("test", 'make test FAIL_IMMEDIATELY=1 TESTS="${TESTS}"',"text/plain") ],
+ ("test", 'make test FAIL_IMMEDIATELY=1 TESTS="${TESTS}"',"text/plain")],
# Test cross-compile infrastructure
"samba-xc" : [("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),
@@ -177,7 +177,7 @@ tasks = {
("test", "make quicktest FAIL_IMMEDIATELY=1 TESTS='--include-env=ad_dc'", "text/plain"),
("install", "make install", "text/plain"),
("check-clean-tree", "script/clean-source-tree.sh", "text/plain"),
- ("clean", "make clean", "text/plain") ],
+ ("clean", "make clean", "text/plain")],
"samba-ctdb" : [("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),
@@ -197,7 +197,7 @@ tasks = {
# clean up:
("check-clean-tree", "script/clean-source-tree.sh", "text/plain"),
("clean", "make clean", "text/plain"),
- ("ctdb-clean", "cd ./ctdb && make clean", "text/plain") ],
+ ("ctdb-clean", "cd ./ctdb && make clean", "text/plain")],
"samba-libs" : [
("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),
@@ -320,7 +320,7 @@ tasks = {
("install-no-lmdb", "make install", "text/plain"),
("check-clean-tree", "../../script/clean-source-tree.sh", "text/plain"),
("distcheck", "make distcheck", "text/plain"),
- ("clean", "make clean", "text/plain") ],
+ ("clean", "make clean", "text/plain")],
"tdb" : [
("random-sleep", "../../script/random-sleep.sh 60 600", "text/plain"),
@@ -330,7 +330,7 @@ tasks = {
("test", "make test", "text/plain"),
("check-clean-tree", "../../script/clean-source-tree.sh", "text/plain"),
("distcheck", "make distcheck", "text/plain"),
- ("clean", "make clean", "text/plain") ],
+ ("clean", "make clean", "text/plain")],
"talloc" : [
("random-sleep", "../../script/random-sleep.sh 60 600", "text/plain"),
@@ -340,7 +340,7 @@ tasks = {
("test", "make test", "text/plain"),
("check-clean-tree", "../../script/clean-source-tree.sh", "text/plain"),
("distcheck", "make distcheck", "text/plain"),
- ("clean", "make clean", "text/plain") ],
+ ("clean", "make clean", "text/plain")],
"replace" : [
("random-sleep", "../../script/random-sleep.sh 60 600", "text/plain"),
@@ -350,7 +350,7 @@ tasks = {
("test", "make test", "text/plain"),
("check-clean-tree", "../../script/clean-source-tree.sh", "text/plain"),
("distcheck", "make distcheck", "text/plain"),
- ("clean", "make clean", "text/plain") ],
+ ("clean", "make clean", "text/plain")],
"tevent" : [
("random-sleep", "../../script/random-sleep.sh 60 600", "text/plain"),
@@ -360,22 +360,22 @@ tasks = {
("test", "make test", "text/plain"),
("check-clean-tree", "../../script/clean-source-tree.sh", "text/plain"),
("distcheck", "make distcheck", "text/plain"),
- ("clean", "make clean", "text/plain") ],
+ ("clean", "make clean", "text/plain")],
"pidl" : [
- ("random-sleep", "../script/random-sleep.sh 60 600", "text/plain"),
- ("configure", "perl Makefile.PL PREFIX=${PREFIX_DIR}", "text/plain"),
- ("touch", "touch *.yp", "text/plain"),
- ("make", "make", "text/plain"),
- ("test", "make test", "text/plain"),
- ("install", "make install", "text/plain"),
- ("checkout-yapp-generated", "git checkout lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm", "text/plain"),
- ("check-clean-tree", "../script/clean-source-tree.sh", "text/plain"),
- ("clean", "make clean", "text/plain") ],
+ ("random-sleep", "../script/random-sleep.sh 60 600", "text/plain"),
+ ("configure", "perl Makefile.PL PREFIX=${PREFIX_DIR}", "text/plain"),
+ ("touch", "touch *.yp", "text/plain"),
+ ("make", "make", "text/plain"),
+ ("test", "make test", "text/plain"),
+ ("install", "make install", "text/plain"),
+ ("checkout-yapp-generated", "git checkout lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm", "text/plain"),
+ ("check-clean-tree", "../script/clean-source-tree.sh", "text/plain"),
+ ("clean", "make clean", "text/plain")],
# these are useful for debugging autobuild
- 'pass' : [("pass", 'echo passing && /bin/true', "text/plain") ],
- 'fail' : [("fail", 'echo failing && /bin/false', "text/plain") ]
+ 'pass' : [("pass", 'echo passing && /bin/true', "text/plain")],
+ 'fail' : [("fail", 'echo failing && /bin/false', "text/plain")]
}
def do_print(msg):
@@ -491,7 +491,7 @@ class buildlist(object):
rebase_remote,
rebase_remote, rebase_branch
),
- "test/plain" ) ]
+ "test/plain")]
self.retry = builder('retry', retry_task, cp=False)
self.need_retry = False
diff --git a/script/generate_param.py b/script/generate_param.py
index 3ef40038774..b610f6fb5e8 100644
--- a/script/generate_param.py
+++ b/script/generate_param.py
@@ -98,7 +98,7 @@ def iterate_all(path):
'enumlist' : enumlist,
'handler' : handler,
'deprecated' : deprecated,
- 'synonyms' : synonyms }
+ 'synonyms' : synonyms}
# map doc attributes to a section of the generated function
context_dict = {"G": "_GLOBAL", "S": "_LOCAL"}
diff --git a/source3/script/tests/test_wbinfo_sids2xids_int.py b/source3/script/tests/test_wbinfo_sids2xids_int.py
index 6999142cefd..7ffc8ece2f7 100755
--- a/source3/script/tests/test_wbinfo_sids2xids_int.py
+++ b/source3/script/tests/test_wbinfo_sids2xids_int.py
@@ -35,7 +35,7 @@ domsid = domsid.split(' ')[0]
#print domain
#print domsid
-sids=[domsid + '-512', 'S-1-5-32-545', domsid + '-513', 'S-1-1-0', 'S-1-3-1', 'S-1-5-1' ]
+sids=[domsid + '-512', 'S-1-5-32-545', domsid + '-513', 'S-1-1-0', 'S-1-3-1', 'S-1-5-1']
flush_cache(sids=sids)
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index e0df940f0dc..e5b3fd6f33b 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -131,7 +131,7 @@ for s in shares:
plansmbtorture4testsuite(t, "simpleserver", "//%s/%s %s" % ('$SERVER_IP', s, ' -U$USERNAME%$PASSWORD'), description=s)
posix_tests = ["POSIX", "POSIX-APPEND", "POSIX-SYMLINK-ACL", "POSIX-SYMLINK-EA", "POSIX-OFD-LOCK",
- "POSIX-STREAM-DELETE", "WINDOWS-BAD-SYMLINK" ]
+ "POSIX-STREAM-DELETE", "WINDOWS-BAD-SYMLINK"]
for t in posix_tests:
plantestsuite("samba3.smbtorture_s3.plain(nt4_dc).%s" % t, "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/posix_share', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
@@ -227,19 +227,19 @@ plantestsuite("samba3.wbinfo_simple.(%s:local).%s" % (env, t), "%s:local" % env,
plantestsuite("samba3.wbinfo_name_lookup", env,
[os.path.join(srcdir(),
"nsswitch/tests/test_wbinfo_name_lookup.sh"),
- '$DOMAIN', '$REALM', '$DC_USERNAME' ])
+ '$DOMAIN', '$REALM', '$DC_USERNAME'])
env = "ad_member:local"
plantestsuite("samba3.wbinfo_user_info", env,
[os.path.join(srcdir(),
"nsswitch/tests/test_wbinfo_user_info.sh"),
- '$DOMAIN', '$REALM', '$DOMAIN', 'alice', 'alice', 'jane', 'jane.doe' ])
+ '$DOMAIN', '$REALM', '$DOMAIN', 'alice', 'alice', 'jane', 'jane.doe'])
env = "fl2008r2dc:local"
plantestsuite("samba3.wbinfo_user_info", env,
[os.path.join(srcdir(),
"nsswitch/tests/test_wbinfo_user_info.sh"),
- '$TRUST_DOMAIN', '$TRUST_REALM', '$DOMAIN', 'alice', 'alice', 'jane', 'jane.doe' ])
+ '$TRUST_DOMAIN', '$TRUST_REALM', '$DOMAIN', 'alice', 'alice', 'jane', 'jane.doe'])
env = "ad_member"
t = "WBCLIENT-MULTI-PING"
@@ -426,7 +426,7 @@ rap = ["rap.basic", "rap.rpc", "rap.printing", "rap.sam"]
unix = ["unix.info2", "unix.whoami"]
-nbt = ["nbt.dgram" ]
+nbt = ["nbt.dgram"]
libsmbclient = ["libsmbclient"]
@@ -636,10 +636,10 @@ plantestsuite("samba3.blackbox.sharesec", "simpleserver:local",
plantestsuite("samba3.blackbox.net_tdb", "simpleserver:local",
[os.path.join(samba3srcdir, "script/tests/test_net_tdb.sh"),
smbclient3, '$SERVER', 'tmp', '$USERNAME', '$PASSWORD',
- configuration, '$LOCAL_PATH', '$LOCK_DIR' ])
+ configuration, '$LOCAL_PATH', '$LOCK_DIR'])
plantestsuite("samba3.blackbox.smbd_error", "simpleserver:local",
- [os.path.join(samba3srcdir, "script/tests/test_smbd_error.sh") ])
+ [os.path.join(samba3srcdir, "script/tests/test_smbd_error.sh")])
plantestsuite("samba3.blackbox.net_cache_samlogon", "ad_member:local",
[os.path.join(samba3srcdir, "script/tests/test_net_cache_samlogon.sh"),
diff --git a/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py b/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py
index ed740f47a12..27b3ad59d5b 100755
--- a/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py
+++ b/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py
@@ -177,7 +177,7 @@ def pull_classinfo(db):
classinfo[name]["objectClassCategory"] = 0
for a in ["possSuperiors", "systemPossSuperiors",
"auxiliaryClass", "systemAuxiliaryClass",
- "subClassOf" ]:
+ "subClassOf"]:
classinfo[name][a] = []
if r.get(a):
for i in r[a]:
diff --git a/source4/dsdb/tests/python/acl.py b/source4/dsdb/tests/python/acl.py
index 9ad8b0c620e..6803483dc46 100755
--- a/source4/dsdb/tests/python/acl.py
+++ b/source4/dsdb/tests/python/acl.py
@@ -240,7 +240,7 @@ class AclAddTests(AclTests):
res = self.ldb_admin.search(self.base_dn,
expression="(distinguishedName=%s,%s)" %
("CN=test_add_group1,OU=test_add_ou2,OU=test_add_ou1",
- self.base_dn) )
+ self.base_dn))
self.assertEqual(len(res), 0)
def test_add_u4(self):
@@ -535,7 +535,7 @@ adminDescription: blah blah blah"""
# Modify on attribute you have rights for
self.ldb_user.modify_ldif(ldif)
res = self.ldb_admin.search(self.base_dn, expression="(distinguishedName=%s)" \
- % self.get_user_dn(self.user_with_wp), attrs=["adminDescription"] )
+ % self.get_user_dn(self.user_with_wp), attrs=["adminDescription"])
self.assertEqual(res[0]["adminDescription"][0], "blah blah blah")
def test_modify_u5(self):
@@ -803,20 +803,20 @@ class AclSearchTests(AclTests):
ok_list = [Dn(self.ldb_admin, "OU=ou2,OU=ou1," + self.base_dn),
Dn(self.ldb_admin, "OU=ou1," + self.base_dn)]
- res_list = [x["dn"] for x in res if x["dn"] in ok_list ]
+ res_list = [x["dn"] for x in res if x["dn"] in ok_list]
self.assertEquals(sorted(res_list), sorted(ok_list))
#these users should see all ous
res = self.ldb_user.search("OU=ou1," + self.base_dn, expression="(objectClass=*)",
scope=SCOPE_SUBTREE)
self.assertEquals(len(res), 6)
- res_list = [x["dn"] for x in res if x["dn"] in self.full_list ]
+ res_list = [x["dn"] for x in res if x["dn"] in self.full_list]
self.assertEquals(sorted(res_list), sorted(self.full_list))
res = self.ldb_user2.search("OU=ou1," + self.base_dn, expression="(objectClass=*)",
scope=SCOPE_SUBTREE)
self.assertEquals(len(res), 6)
- res_list = [x["dn"] for x in res if x["dn"] in self.full_list ]
+ res_list = [x["dn"] for x in res if x["dn"] in self.full_list]
self.assertEquals(sorted(res_list), sorted(self.full_list))
def test_search2(self):
@@ -832,7 +832,7 @@ class AclSearchTests(AclTests):
res = self.ldb_user3.search("OU=ou1," + self.base_dn, expression="(objectClass=*)",
scope=SCOPE_SUBTREE)
#this user should see all ous
- res_list = [x["dn"] for x in res if x["dn"] in self.full_list ]
+ res_list = [x["dn"] for x in res if x["dn"] in self.full_list]
self.assertEquals(sorted(res_list), sorted(self.full_list))
#these users should see ou1, 2, 5 and 6 but not 3 and 4
@@ -842,13 +842,13 @@ class AclSearchTests(AclTests):
Dn(self.ldb_admin, "OU=ou1," + self.base_dn),
Dn(self.ldb_admin, "OU=ou5,OU=ou3,OU=ou2,OU=ou1," + self.base_dn),
Dn(self.ldb_admin, "OU=ou6,OU=ou4,OU=ou2,OU=ou1," + self.base_dn)]
- res_list = [x["dn"] for x in res if x["dn"] in ok_list ]
+ res_list = [x["dn"] for x in res if x["dn"] in ok_list]
self.assertEquals(sorted(res_list), sorted(ok_list))
res = self.ldb_user2.search("OU=ou1," + self.base_dn, expression="(objectClass=*)",
scope=SCOPE_SUBTREE)
self.assertEquals(len(res), 4)
- res_list = [x["dn"] for x in res if x["dn"] in ok_list ]
+ res_list = [x["dn"] for x in res if x["dn"] in ok_list]
self.assertEquals(sorted(res_list), sorted(ok_list))
def test_search3(self):
@@ -882,7 +882,7 @@ class AclSearchTests(AclTests):
res = self.ldb_user3.search("OU=ou1," + self.base_dn, expression="(objectClass=*)",
scope=SCOPE_SUBTREE)
- res_list = [x["dn"] for x in res if x["dn"] in ok_list ]
+ res_list = [x["dn"] for x in res if x["dn"] in ok_list]
self.assertEquals(sorted(res_list), sorted(ok_list))
ok_list = [Dn(self.ldb_admin, "OU=ou2,OU=ou1," + self.base_dn),
@@ -894,13 +894,13 @@ class AclSearchTests(AclTests):
res = self.ldb_user.search("OU=ou1," + self.base_dn, expression="(objectClass=*)",
scope=SCOPE_SUBTREE)
self.assertEquals(len(res), 4)
- res_list = [x["dn"] for x in res if x["dn"] in ok_list ]
+ res_list = [x["dn"] for x in res if x["dn"] in ok_list]
self.assertEquals(sorted(res_list), sorted(ok_list))
res = self.ldb_user2.search("OU=ou1," + self.base_dn, expression="(objectClass=*)",
scope=SCOPE_SUBTREE)
self.assertEquals(len(res), 4)
- res_list = [x["dn"] for x in res if x["dn"] in ok_list ]
+ res_list = [x["dn"] for x in res if x["dn"] in ok_list]
self.assertEquals(sorted(res_list), sorted(ok_list))
def test_search4(self):
@@ -921,13 +921,13 @@ class AclSearchTests(AclTests):
res = self.ldb_user3.search("OU=ou1," + self.base_dn, expression="(objectClass=*)",
scope=SCOPE_SUBTREE)
self.assertEquals(len(res), 2)
- res_list = [x["dn"] for x in res if x["dn"] in ok_list ]
+ res_list = [x["dn"] for x in res if x["dn"] in ok_list]
self.assertEquals(sorted(res_list), sorted(ok_list))
res = self.ldb_user.search("OU=ou1," + self.base_dn, expression="(objectClass=*)",
scope=SCOPE_SUBTREE)
self.assertEquals(len(res), 2)
- res_list = [x["dn"] for x in res if x["dn"] in ok_list ]
+ res_list = [x["dn"] for x in res if x["dn"] in ok_list]
self.assertEquals(sorted(res_list), sorted(ok_list))
def test_search5(self):
@@ -1959,15 +1959,15 @@ class AclSPNTests(AclTests):
# same as for join_RODC, but do not set any SPNs
def create_rodc(self, ctx):
- ctx.nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn ]
- ctx.full_nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn ]
+ ctx.nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn]
+ ctx.full_nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn]
ctx.krbtgt_dn = "CN=krbtgt_%s,CN=Users,%s" % (ctx.myname, ctx.base_dn)
ctx.never_reveal_sid = ["<SID=%s-%s>" % (ctx.domsid, security.DOMAIN_RID_RODC_DENY),
"<SID=%s>" % security.SID_BUILTIN_ADMINISTRATORS,
"<SID=%s>" % security.SID_BUILTIN_SERVER_OPERATORS,
"<SID=%s>" % security.SID_BUILTIN_BACKUP_OPERATORS,
- "<SID=%s>" % security.SID_BUILTIN_ACCOUNT_OPERATORS ]
+ "<SID=%s>" % security.SID_BUILTIN_ACCOUNT_OPERATORS]
ctx.reveal_sid = "<SID=%s-%s>" % (ctx.domsid, security.DOMAIN_RID_RODC_ALLOW)
mysid = ctx.get_mysid()
@@ -1990,8 +1990,8 @@ class AclSPNTests(AclTests):
ctx.join_add_objects()
def create_dc(self, ctx):
- ctx.nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn ]
- ctx.full_nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn ]
+ ctx.nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn]
+ ctx.full_nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn]
ctx.userAccountControl = samba.dsdb.UF_SERVER_TRUST_ACCOUNT | samba.dsdb.UF_TRUSTED_FOR_DELEGATION
ctx.secure_channel_type = misc.SEC_CHAN_BDC
ctx.replica_flags = (drsuapi.DRSUAPI_DRS_WRIT_REP |
diff --git a/source4/dsdb/tests/python/deletetest.py b/source4/dsdb/tests/python/deletetest.py
index cfdddc2a447..4cf3da7c430 100755
--- a/source4/dsdb/tests/python/deletetest.py
+++ b/source4/dsdb/tests/python/deletetest.py
@@ -316,24 +316,24 @@ class BasicTreeDeleteTests(BasicDeleteTests):
"objectclass": "group",
"description": "test group",
"samaccountname": grp_name,
- "member": [self.usr1, self.usr2 ],
- "isDeleted": "FALSE" })
+ "member": [self.usr1, self.usr2],
+ "isDeleted": "FALSE"})
self.ldb.add({
"dn": self.sit1,
- "objectclass": "site" })
+ "objectclass": "site"})
self.ldb.add({
"dn": self.ss1,
- "objectclass": ["applicationSiteSettings", "nTDSSiteSettings"] })
+ "objectclass": ["applicationSiteSettings", "nTDSSiteSettings"]})
self.ldb.add({
"dn": self.srv1,
- "objectclass": "serversContainer" })
+ "objectclass": "serversContainer"})
self.ldb.add({
"dn": self.srv2,
- "objectClass": "server" })
+ "objectClass": "server"})
self.objLive1 = self.search_dn(self.usr1)
self.guid1=self.objLive1["objectGUID"][0]
diff --git a/source4/dsdb/tests/python/dirsync.py b/source4/dsdb/tests/python/dirsync.py
index fb2b08097fe..ae36a5157c7 100755
--- a/source4/dsdb/tests/python/dirsync.py
+++ b/source4/dsdb/tests/python/dirsync.py
@@ -302,7 +302,7 @@ class SimpleDirsyncTests(DirsyncBaseTests):
delta.dn = Dn(self.ldb_admin, str(ouname))
delta["cn"] = MessageElement("test ou",
FLAG_MOD_ADD,
- "cn" )
+ "cn")
self.ldb_admin.modify(delta)
res = self.ldb_admin.search(self.base_dn,
expression="name=testou",
@@ -417,7 +417,7 @@ class SimpleDirsyncTests(DirsyncBaseTests):
delta["cn"] = MessageElement("test ou",
FLAG_MOD_ADD,
- "cn" )
+ "cn")
self.ldb_admin.modify(delta)
res = self.ldb_admin.search(self.base_dn,
expression="(&(objectClass=organizationalUnit)(!(isDeleted=*)))",
@@ -431,7 +431,7 @@ class SimpleDirsyncTests(DirsyncBaseTests):
delta.dn = Dn(self.ldb_admin, str(ouname))
delta["cn"] = MessageElement([],
FLAG_MOD_DELETE,
- "cn" )
+ "cn")
self.ldb_admin.modify(delta)
res = self.ldb_admin.search(self.base_dn,
expression="(&(objectClass=organizationalUnit)(!(isDeleted=*)))",
@@ -496,7 +496,7 @@ class SimpleDirsyncTests(DirsyncBaseTests):
expression="(name=Administrators)",
controls=[control1])
- self.assertEqual(len(res[0].get("member")), size )
+ self.assertEqual(len(res[0].get("member")), size)
self.ldb_admin.newgroup("testgroup")
self.ldb_admin.add_remove_group_members("testgroup", [self.simple_user],
@@ -507,7 +507,7 @@ class SimpleDirsyncTests(DirsyncBaseTests):
controls=["dirsync:1:0:1"])
self.assertEqual(len(res[0].get("member")), 1)
- self.assertTrue(res[0].get("member") != "" )
+ self.assertTrue(res[0].get("member") != "")
ctl = str(res.controls[0]).split(":")
ctl[1] = "1"
@@ -598,7 +598,7 @@ class ExtendedDirsyncTests(SimpleDirsyncTests):
expression="(name=Administrators)",
controls=["dirsync:1:%d:1" % flag_incr_linked])
- self.assertTrue(res[0].get("member;range=1-1") != None )
+ self.assertTrue(res[0].get("member;range=1-1") != None)
self.assertTrue(len(res[0].get("member;range=1-1")) > 0)
size = len(res[0].get("member;range=1-1"))
@@ -632,7 +632,7 @@ class ExtendedDirsyncTests(SimpleDirsyncTests):
expression="(name=Administrators)",
controls=[control1])
- self.assertEqual(res[0].get("member;range=1-1"), None )
+ self.assertEqual(res[0].get("member;range=1-1"), None)
self.assertEqual(len(res[0].get("member;range=0-0")), 1)
ctl = str(res.controls[0]).split(":")
@@ -648,14 +648,14 @@ class ExtendedDirsyncTests(SimpleDirsyncTests):
expression="(name=Administrators)",
controls=[control2])
- self.assertEqual(res[0].get("member;range=1-1"), None )
+ self.assertEqual(res[0].get("member;range=1-1"), None)
self.assertEqual(len(res[0].get("member;range=0-0")), 1)
res = self.ldb_admin.search(self.base_dn,
expression="(name=Administrators)",
controls=[control1])
- self.assertEqual(res[0].get("member;range=1-1"), None )
+ self.assertEqual(res[0].get("member;range=1-1"), None)
self.assertEqual(len(res[0].get("member;range=0-0")), 2)
def test_dirsync_deleted_items(self):
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index a50b9141141..8a15daee04f 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -115,7 +115,7 @@ class BasicTests(samba.tests.TestCase):
try:
self.ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
- "objectClass": [] })
+ "objectClass": []})
self.fail()
except LdbError as e1:
(num, _) = e1.args
@@ -125,7 +125,7 @@ class BasicTests(samba.tests.TestCase):
try:
self.ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
- "objectClass": "X" })
+ "objectClass": "X"})
self.fail()
except LdbError as e2:
(num, _) = e2.args
@@ -136,7 +136,7 @@ class BasicTests(samba.tests.TestCase):
self.ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
"objectClass": "person",
- "objectCategory": self.base_dn })
+ "objectCategory": self.base_dn})
self.fail()
except LdbError as e3:
(num, _) = e3.args
@@ -147,7 +147,7 @@ class BasicTests(samba.tests.TestCase):
self.ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
"objectClass": "person",
- "systemFlags": ["0", str(SYSTEM_FLAG_DOMAIN_DISALLOW_MOVE)] })
+ "systemFlags": ["0", str(SYSTEM_FLAG_DOMAIN_DISALLOW_MOVE)]})
self.fail()
except LdbError as e4:
(num, _) = e4.args
@@ -162,7 +162,7 @@ class BasicTests(samba.tests.TestCase):
try:
self.ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
- "objectClass": "connectionPoint" })
+ "objectClass": "connectionPoint"})
self.fail()
except LdbError as e5:
(num, _) = e5.args
@@ -170,7 +170,7 @@ class BasicTests(samba.tests.TestCase):
try:
self.ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
- "objectClass": ["person", "leaf"] })
+ "objectClass": ["person", "leaf"]})
self.fail()
except LdbError as e6:
(num, _) = e6.args
@@ -180,7 +180,7 @@ class BasicTests(samba.tests.TestCase):
# subclasses) are allowed
self.ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
- "objectClass": ["top", "leaf", "connectionPoint", "serviceConnectionPoint"] })
+ "objectClass": ["top", "leaf", "connectionPoint", "serviceConnectionPoint"]})
delete_force(self.ldb, "cn=ldaptestuser,cn=users," + self.base_dn)
@@ -188,7 +188,7 @@ class BasicTests(samba.tests.TestCase):
try:
self.ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
- "objectClass": ["person", "container"] })
+ "objectClass": ["person", "container"]})
self.fail()
except LdbError as e7:
(num, _) = e7.args
@@ -198,7 +198,7 @@ class BasicTests(samba.tests.TestCase):
self.ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
"objectClass": "person",
- "systemFlags": str(~(SYSTEM_FLAG_CONFIG_ALLOW_RENAME | SYSTEM_FLAG_CONFIG_ALLOW_MOVE | SYSTEM_FLAG_CONFIG_ALLOW_LIMITED_MOVE)) })
+ "systemFlags": str(~(SYSTEM_FLAG_CONFIG_ALLOW_RENAME | SYSTEM_FLAG_CONFIG_ALLOW_MOVE | SYSTEM_FLAG_CONFIG_ALLOW_LIMITED_MOVE))})
res = ldb.search("cn=ldaptestuser,cn=users," + self.base_dn,
scope=SCOPE_BASE, attrs=["systemFlags"])
@@ -209,7 +209,7 @@ class BasicTests(samba.tests.TestCase):
self.ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
- "objectClass": "person" })
+ "objectClass": "person"})
# We can remove derivation classes of the structural objectclass
# but they're going to be readded afterwards
@@ -418,7 +418,7 @@ class BasicTests(samba.tests.TestCase):
self.ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
- "objectClass": "user" })
+ "objectClass": "user"})
# Add a new top-most structural class "container". This does not work
# since it stands in no direct relation to the current one.
@@ -905,7 +905,7 @@ class BasicTests(samba.tests.TestCase):
ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
"objectClass": "person",
- "sn": "" })
+ "sn": ""})
self.fail()
except LdbError as e39:
(num, _) = e39.args
@@ -923,7 +923,7 @@ class BasicTests(samba.tests.TestCase):
ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
- "objectClass": "person" })
+ "objectClass": "person"})
# Too short (min. 1)
m = Message()
@@ -1038,7 +1038,7 @@ class BasicTests(samba.tests.TestCase):
self.ldb.add({
"dn": "cn=ldaptestgroup,cn=users," + self.base_dn,
"objectclass": "group",
- "instanceType": "1" })
+ "instanceType": "1"})
self.fail()
except LdbError as e47:
(num, _) = e47.args
@@ -1049,7 +1049,7 @@ class BasicTests(samba.tests.TestCase):
self.ldb.add({
"dn": "cn=ldaptestgroup,cn=users," + self.base_dn,
"objectclass": "group",
- "instanceType": "32" })
+ "instanceType": "32"})
self.fail()
except LdbError as e48:
(num, _) = e48.args
@@ -1098,7 +1098,7 @@ class BasicTests(samba.tests.TestCase):
self.ldb.add({
"dn": "cn=ldaptestuser2,cn=users," + self.base_dn,
"objectclass": "user",
- "instanceType": "3" })
+ "instanceType": "3"})
self.fail()
except LdbError as e52:
(num, _) = e52.args
@@ -1418,7 +1418,7 @@ objectClass: container
self.ldb.add({
"dn": "cn=ldaptestuser2,cn=users," + self.base_dn,
- "objectclass": "user" })
+ "objectclass": "user"})
ldb.rename("cn=ldaptestuser2,cn=users," + self.base_dn, "cn=ldaptestuser2,cn=users," + self.base_dn)
ldb.rename("cn=ldaptestuser2,cn=users," + self.base_dn, "cn=ldaptestuser3,cn=users," + self.base_dn)
@@ -1524,13 +1524,13 @@ objectClass: container
"""Tests the rename operation twice - this corresponds to a past bug"""
self.ldb.add({
"dn": "cn=ldaptestuser5,cn=users," + self.base_dn,
- "objectclass": "user" })
+ "objectclass": "user"})
ldb.rename("cn=ldaptestuser5,cn=users," + self.base_dn, "cn=ldaptestUSER5,cn=users," + self.base_dn)
delete_force(self.ldb, "cn=ldaptestuser5,cn=users," + self.base_dn)
self.ldb.add({
"dn": "cn=ldaptestuser5,cn=users," + self.base_dn,
- "objectclass": "user" })
+ "objectclass": "user"})
ldb.rename("cn=ldaptestuser5,cn=Users," + self.base_dn, "cn=ldaptestUSER5,cn=users," + self.base_dn)
res = ldb.search(expression="cn=ldaptestuser5")
self.assertEquals(len(res), 1, "Wrong number of hits for cn=ldaptestuser5")
@@ -1554,7 +1554,7 @@ objectGUID: bd3480c9-58af-4cd8-92df-bc4a18b6e44d
self.ldb.add({
"dn": "cn=ldaptestcontainer," + self.base_dn,
- "objectClass": "container" })
+ "objectClass": "container"})
# The objectGUID cannot directly be changed
try:
@@ -1648,7 +1648,7 @@ objectGUID: bd3480c9-58af-4cd8-92df-bc4a18b6e44d
self.ldb.add({
"dn": "cn=ldaptestcontainer," + self.base_dn,
- "objectClass": "container" })
+ "objectClass": "container"})
res = ldb.search("cn=ldaptestcontainer," + self.base_dn,
scope=SCOPE_BASE,
@@ -1670,7 +1670,7 @@ objectGUID: bd3480c9-58af-4cd8-92df-bc4a18b6e44d
"uSNCreated" : "1",
"uSNChanged" : "1",
"whenCreated": timestring(long(time.time())),
- "whenChanged": timestring(long(time.time())) })
+ "whenChanged": timestring(long(time.time()))})
res = ldb.search("cn=ldaptestcontainer," + self.base_dn,
scope=SCOPE_BASE,
@@ -2831,7 +2831,7 @@ objectClass: posixAccount"""% (self.base_dn))
self.ldb.add({"dn": user_dn,
"objectClass": "user",
"sAMAccountName": user_name,
- "nTSecurityDescriptor": [] })
+ "nTSecurityDescriptor": []})
self.fail()
except LdbError as e107:
(num, _) = e107.args
@@ -2850,8 +2850,8 @@ sAMAccountName: """ + user_name + """
nTSecurityDescriptor: """ + sddl)
res = self.ldb.search(base=user_dn, attrs=["nTSecurityDescriptor"])
desc = res[0]["nTSecurityDescriptor"][0]
- desc = ndr_unpack(security.descriptor, desc )
- desc_sddl = desc.as_sddl(self.domain_sid )
+ desc = ndr_unpack(security.descriptor, desc)
+ desc_sddl = desc.as_sddl(self.domain_sid)
self.assertEqual(desc_sddl, sddl)
finally:
delete_force(self.ldb, user_dn)
@@ -2886,7 +2886,7 @@ nTSecurityDescriptor:: """ + desc_base64)
try:
sddl = "O:DUG:DUD:AI(A;;RPWP;;;AU)S:PAI"
desc = security.descriptor.from_sddl(sddl, security.dom_sid('S-1-5-21'))
- desc_base64 = base64.b64encode(ndr_pack(desc) ).decode('utf8')
+ desc_base64 = base64.b64encode(ndr_pack(desc)).decode('utf8')
self.ldb.add_ldif("""
dn: """ + user_dn + """
objectclass: user
@@ -2911,7 +2911,7 @@ nTSecurityDescriptor:: """ + desc_base64)
delete_force(self.ldb, user_dn)
self.ldb.add({"dn": user_dn,
"objectClass": "user",
- "sAMAccountName": user_name })
+ "sAMAccountName": user_name})
m = Message()
m.dn = Dn(ldb, user_dn)
@@ -3129,7 +3129,7 @@ nTSecurityDescriptor:: """ + desc_base64
delete_force(self.ldb, user_dn)
self.ldb.add({"dn": user_dn,
"objectClass": "user",
- "sAMAccountName": user_name })
+ "sAMAccountName": user_name})
#
# We check the following values:
@@ -3137,7 +3137,7 @@ nTSecurityDescriptor:: """ + desc_base64
# 370101000000Z => 20370101000000.0Z
# 20370102000000.*Z => 20370102000000.0Z
#
- ext = ["Z", ".0Z", ".Z", ".000Z", ".RandomIgnoredCharacters...987654321Z" ]
+ ext = ["Z", ".0Z", ".Z", ".000Z", ".RandomIgnoredCharacters...987654321Z"]
for i in range(0, len(ext)):
v_raw = "203701%02d000000" % (i + 1)
if ext[i] == "Z":
diff --git a/source4/dsdb/tests/python/passwords.py b/source4/dsdb/tests/python/passwords.py
index 49ffe88dd2b..c7e94b2625b 100755
--- a/source4/dsdb/tests/python/passwords.py
+++ b/source4/dsdb/tests/python/passwords.py
@@ -695,14 +695,14 @@ userPassword: thatsAcomplPASS4
self.ldb.add({
"dn": "cn=testuser2,cn=users," + self.base_dn,
"objectclass": "user",
- "userPassword": ["thatsAcomplPASS1", "thatsAcomplPASS2"] })
+ "userPassword": ["thatsAcomplPASS1", "thatsAcomplPASS2"]})
# This surprisingly should work
delete_force(self.ldb, "cn=testuser2,cn=users," + self.base_dn)
self.ldb.add({
"dn": "cn=testuser2,cn=users," + self.base_dn,
"objectclass": "user",
- "userPassword": ["thatsAcomplPASS1", "thatsAcomplPASS1"] })
+ "userPassword": ["thatsAcomplPASS1", "thatsAcomplPASS1"]})
def test_empty_passwords(self):
print("Performs some empty passwords testing")
@@ -711,7 +711,7 @@ userPassword: thatsAcomplPASS4
self.ldb.add({
"dn": "cn=testuser2,cn=users," + self.base_dn,
"objectclass": "user",
- "unicodePwd": [] })
+ "unicodePwd": []})
self.fail()
except LdbError as e32:
(num, _) = e32.args
@@ -721,7 +721,7 @@ userPassword: thatsAcomplPASS4
self.ldb.add({
"dn": "cn=testuser2,cn=users," + self.base_dn,
"objectclass": "user",
- "dBCSPwd": [] })
+ "dBCSPwd": []})
self.fail()
except LdbError as e33:
(num, _) = e33.args
@@ -731,7 +731,7 @@ userPassword: thatsAcomplPASS4
self.ldb.add({
"dn": "cn=testuser2,cn=users," + self.base_dn,
"objectclass": "user",
- "userPassword": [] })
+ "userPassword": []})
self.fail()
except LdbError as e34:
(num, _) = e34.args
@@ -741,7 +741,7 @@ userPassword: thatsAcomplPASS4
self.ldb.add({
"dn": "cn=testuser2,cn=users," + self.base_dn,
"objectclass": "user",
- "clearTextPassword": [] })
+ "clearTextPassword": []})
self.fail()
except LdbError as e35:
(num, _) = e35.args
diff --git a/source4/dsdb/tests/python/sam.py b/source4/dsdb/tests/python/sam.py
index aa0c16534b6..a843c67f244 100755
--- a/source4/dsdb/tests/python/sam.py
+++ b/source4/dsdb/tests/python/sam.py
@@ -203,7 +203,7 @@ class SamTests(samba.tests.TestCase):
ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
"objectclass": "user",
- "userAccountControl": str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD) })
+ "userAccountControl": str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD)})
res1 = ldb.search("cn=ldaptestuser,cn=users," + self.base_dn,
scope=SCOPE_BASE, attrs=["primaryGroupID"])
@@ -218,7 +218,7 @@ class SamTests(samba.tests.TestCase):
ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
"objectclass": "computer",
- "userAccountControl": str(UF_WORKSTATION_TRUST_ACCOUNT | UF_PASSWD_NOTREQD) })
+ "userAccountControl": str(UF_WORKSTATION_TRUST_ACCOUNT | UF_PASSWD_NOTREQD)})
res1 = ldb.search("cn=ldaptestuser,cn=users," + self.base_dn,
scope=SCOPE_BASE, attrs=["primaryGroupID"])
@@ -230,7 +230,7 @@ class SamTests(samba.tests.TestCase):
ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
"objectclass": "computer",
- "userAccountControl": str(UF_SERVER_TRUST_ACCOUNT | UF_PASSWD_NOTREQD) })
+ "userAccountControl": str(UF_SERVER_TRUST_ACCOUNT | UF_PASSWD_NOTREQD)})
res1 = ldb.search("cn=ldaptestuser,cn=users," + self.base_dn,
scope=SCOPE_BASE, attrs=["primaryGroupID"])
@@ -245,7 +245,7 @@ class SamTests(samba.tests.TestCase):
ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
"objectclass": "computer",
- "userAccountControl": str(UF_PARTIAL_SECRETS_ACCOUNT | UF_WORKSTATION_TRUST_ACCOUNT | UF_PASSWD_NOTREQD) })
+ "userAccountControl": str(UF_PARTIAL_SECRETS_ACCOUNT | UF_WORKSTATION_TRUST_ACCOUNT | UF_PASSWD_NOTREQD)})
res1 = ldb.search("cn=ldaptestuser,cn=users," + self.base_dn,
scope=SCOPE_BASE, attrs=["primaryGroupID"])
@@ -3320,7 +3320,7 @@ class SamTests(samba.tests.TestCase):
"objectclass": "computer",
"dNSHostName": "testname.testdom",
"sAMAccountName": "testname$",
- "servicePrincipalName": ["HOST/testname.testdom", "HOST/testname" ]
+ "servicePrincipalName": ["HOST/testname.testdom", "HOST/testname"]
})
m = Message()
@@ -3348,7 +3348,7 @@ class SamTests(samba.tests.TestCase):
"objectclass": "computer",
"dNSHostName": "testname.testdom",
"sAMAccountName": "testname$",
- "servicePrincipalName": ["HOST/testname.testdom", "HOST/testname" ]
+ "servicePrincipalName": ["HOST/testname.testdom", "HOST/testname"]
})
m = Message()
@@ -3470,7 +3470,7 @@ class SamTests(samba.tests.TestCase):
self.ldb.add({
"dn": "cn=ldaptestgroup,cn=users," + self.base_dn,
- "objectclass": "group" })
+ "objectclass": "group"})
m = Message()
m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
@@ -3611,7 +3611,7 @@ class SamTests(samba.tests.TestCase):
self.ldb.add({
"dn": "cn=ldaptestgroup,cn=users," + self.base_dn,
"objectclass": "group",
- "fSMORoleOwner": [] })
+ "fSMORoleOwner": []})
self.fail()
except LdbError as e84:
(num, _) = e84.args
@@ -3623,13 +3623,13 @@ class SamTests(samba.tests.TestCase):
self.ldb.add({
"dn": "cn=ldaptestgroup,cn=users," + self.base_dn,
"objectclass": "group",
- "fSMORoleOwner": ds_service_name })
+ "fSMORoleOwner": ds_service_name})
delete_force(self.ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
self.ldb.add({
"dn": "cn=ldaptestgroup,cn=users," + self.base_dn,
- "objectclass": "group" })
+ "objectclass": "group"})
m = Message()
m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
diff --git a/source4/dsdb/tests/python/sec_descriptor.py b/source4/dsdb/tests/python/sec_descriptor.py
index ad82fce5d67..1b7c84e2c07 100755
--- a/source4/dsdb/tests/python/sec_descriptor.py
+++ b/source4/dsdb/tests/python/sec_descriptor.py
@@ -409,7 +409,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
object_dn = "OU=test_domain_ou1," + self.base_dn
delete_force(self.ldb_admin, object_dn)
self.ldb_admin.create_ou(object_dn)
- user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name) )
+ user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))
mod = "(A;CI;WPWDCC;;;%s)" % str(user_sid)
self.sd_utils.dacl_add_ace(object_dn, mod)
# Create additional object into the first one
@@ -433,7 +433,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
object_dn = "OU=test_domain_ou1," + self.base_dn
delete_force(self.ldb_admin, object_dn)
self.ldb_admin.create_ou(object_dn)
- user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name) )
+ user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))
mod = "(A;CI;WPWDCC;;;%s)" % str(user_sid)
self.sd_utils.dacl_add_ace(object_dn, mod)
# Create additional object into the first one
@@ -553,7 +553,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
object_dn = "OU=test_domain_ou1," + self.base_dn
delete_force(self.ldb_admin, object_dn)
self.ldb_admin.create_ou(object_dn)
- user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name) )
+ user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))
mod = "(A;CI;WOWDCC;;;%s)" % str(user_sid)
self.sd_utils.dacl_add_ace(object_dn, mod)
# Create a custom security descriptor
@@ -580,7 +580,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
object_dn = "OU=test_domain_ou1," + self.base_dn
delete_force(self.ldb_admin, object_dn)
self.ldb_admin.create_ou(object_dn)
- user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name) )
+ user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))
mod = "(A;CI;WOWDCC;;;%s)" % str(user_sid)
self.sd_utils.dacl_add_ace(object_dn, mod)
# Create a custom security descriptor
@@ -670,7 +670,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
object_dn = "OU=test_domain_ou1," + self.base_dn
delete_force(self.ldb_admin, object_dn)
self.ldb_admin.create_ou(object_dn)
- user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name) )
+ user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))
mod = "(D;CI;WP;;;S-1-3-0)"
#mod = ""
self.sd_utils.dacl_add_ace(object_dn, mod)
@@ -691,7 +691,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
# Open Ldb connection with the tested user
_ldb = self.get_ldb_connection(user_name, "samba123@")
# Change Schema partition descriptor
- user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name) )
+ user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))
mod = "(A;;WDCC;;;AU)"
self.sd_utils.dacl_add_ace(self.schema_dn, mod)
# Create example Schema class
@@ -737,7 +737,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
# Open Ldb connection with the tested user
_ldb = self.get_ldb_connection(user_name, "samba123@")
#Change Schema partition descriptor
- user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name) )
+ user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))
mod = "(A;CI;WDCC;;;AU)"
self.sd_utils.dacl_add_ace(self.schema_dn, mod)
# Create example Schema class
@@ -848,7 +848,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
_ldb = self.get_ldb_connection(user_name, "samba123@")
# Create a custom security descriptor
# NB! Problematic owner part won't accept DA only <User Sid> !!!
- user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name) )
+ user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))
desc_sddl = "O:%sG:DAD:(A;;RP;;;DU)" % str(user_sid)
# Create example Schema class
class_dn = self.create_schema_class(_ldb, desc_sddl)
@@ -863,7 +863,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
_ldb = self.get_ldb_connection(user_name, "samba123@")
# Create a custom security descriptor
# NB! Problematic owner part won't accept DA only <User Sid> !!!
- user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name) )
+ user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))
desc_sddl = "O:%sG:DAD:(A;;RP;;;DU)" % str(user_sid)
# Create example Schema class
class_dn = self.create_schema_class(_ldb, desc_sddl)
@@ -978,7 +978,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
object_dn = "CN=test-container1,CN=DisplaySpecifiers," + self.configuration_dn
delete_force(self.ldb_admin, object_dn)
self.create_configuration_container(self.ldb_admin, object_dn, )
- user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name) )
+ user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))
mod = "(A;;WDCC;;;AU)"
self.sd_utils.dacl_add_ace(object_dn, mod)
# Create child object with user's credentials
@@ -999,7 +999,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
object_dn = "CN=test-container1,CN=DisplaySpecifiers," + self.configuration_dn
delete_force(self.ldb_admin, object_dn)
self.create_configuration_container(self.ldb_admin, object_dn, )
- user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name) )
+ user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))
mod = "(A;CI;WDCC;;;AU)"
self.sd_utils.dacl_add_ace(object_dn, mod)
# Create child object with user's credentials
@@ -1114,7 +1114,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
object_dn = "CN=test-container1,CN=DisplaySpecifiers," + self.configuration_dn
delete_force(self.ldb_admin, object_dn)
self.create_configuration_container(self.ldb_admin, object_dn, )
- user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name) )
+ user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))
mod = "(A;;CC;;;AU)"
self.sd_utils.dacl_add_ace(object_dn, mod)
# Create child object with user's credentials
@@ -1137,7 +1137,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
object_dn = "CN=test-container1,CN=DisplaySpecifiers," + self.configuration_dn
delete_force(self.ldb_admin, object_dn)
self.create_configuration_container(self.ldb_admin, object_dn, )
- user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name) )
+ user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))
mod = "(A;;CC;;;AU)"
self.sd_utils.dacl_add_ace(object_dn, mod)
# Create child object with user's credentials
diff --git a/source4/dsdb/tests/python/tombstone_reanimation.py b/source4/dsdb/tests/python/tombstone_reanimation.py
index 6185922dcf5..9922f7cc568 100755
--- a/source4/dsdb/tests/python/tombstone_reanimation.py
+++ b/source4/dsdb/tests/python/tombstone_reanimation.py
@@ -97,7 +97,7 @@ class RestoredObjectAttributesBaseTestCase(samba.tests.TestCase):
if orig_val is None:
continue
if not isinstance(orig_val, MessageElement):
- orig_val = MessageElement(str(orig_val), 0, attr )
+ orig_val = MessageElement(str(orig_val), 0, attr)
m = Message()
m.add(orig_val)
orig_ldif = self.samdb.write_ldif(m, 0)
@@ -817,7 +817,7 @@ class RestoreGroupObjectTestCase(RestoredObjectAttributesBaseTestCase):
'uSNChanged': '**',
'instanceType': '4',
'adminCount': '0',
- 'cn': groupname }
+ 'cn': groupname}
def test_plain_group(self):
print("Test restored Group attributes")
@@ -882,7 +882,7 @@ class RestoreContainerObjectTestCase(RestoredObjectAttributesBaseTestCase):
'uSNCreated': '**',
'uSNChanged': '**',
'instanceType': '4',
- rdn.lower(): name }
+ rdn.lower(): name}
def _create_test_ou(self, rdn, name=None, description=None):
ou_dn = "OU=%s,%s" % (rdn, self.base_dn)
diff --git a/source4/dsdb/tests/python/user_account_control.py b/source4/dsdb/tests/python/user_account_control.py
index e185b63dbfe..38353508e87 100755
--- a/source4/dsdb/tests/python/user_account_control.py
+++ b/source4/dsdb/tests/python/user_account_control.py
@@ -100,7 +100,7 @@ class UserAccountControlTests(samba.tests.TestCase):
if others is not None:
msg_dict = dict(msg_dict.items() + others.items())
- msg = ldb.Message.from_dict(self.samdb, msg_dict )
+ msg = ldb.Message.from_dict(self.samdb, msg_dict)
msg["sAMAccountName"] = samaccountname
print("Adding computer account %s" % computername)
diff --git a/source4/scripting/devel/speedtest.py b/source4/scripting/devel/speedtest.py
index 2821aa71424..3abadb05736 100755
--- a/source4/scripting/devel/speedtest.py
+++ b/source4/scripting/devel/speedtest.py
@@ -132,17 +132,17 @@ class SpeedTestAddDel(SpeedTest):
for x in [1, 2, 3]:
start = time.time()
self.create_bundle(num)
- res_add = Decimal(str(time.time() - start) )
+ res_add = Decimal(str(time.time() - start))
avg_add += res_add
- print(" Attempt %s ADD: %.3fs" % (x, float(res_add) ))
+ print(" Attempt %s ADD: %.3fs" % (x, float(res_add)))
#
start = time.time()
self.remove_bundle(num)
- res_del = Decimal(str(time.time() - start) )
+ res_del = Decimal(str(time.time() - start))
avg_del += res_del
- print(" Attempt %s DEL: %.3fs" % (x, float(res_del) ))
- print("Average ADD: %.3fs" % float(Decimal(avg_add) / Decimal("3.0") ))
- print("Average DEL: %.3fs" % float(Decimal(avg_del) / Decimal("3.0") ))
+ print(" Attempt %s DEL: %.3fs" % (x, float(res_del)))
+ print("Average ADD: %.3fs" % float(Decimal(avg_add) / Decimal("3.0")))
+ print("Average DEL: %.3fs" % float(Decimal(avg_del) / Decimal("3.0")))
print("")
def test_00000(self):
@@ -191,10 +191,10 @@ class AclSearchSpeedTest(SpeedTest):
for x in [1, 2, 3]:
start = time.time()
res = _ldb.search(base=self.base_dn, expression="(objectClass=*)", scope=SCOPE_SUBTREE)
- res_search = Decimal(str(time.time() - start) )
+ res_search = Decimal(str(time.time() - start))
avg_search += res_search
- print(" Attempt %s SEARCH: %.3fs" % (x, float(res_search) ))
- print("Average Search: %.3fs" % float(Decimal(avg_search) / Decimal("3.0") ))
+ print(" Attempt %s SEARCH: %.3fs" % (x, float(res_search)))
+ print("Average Search: %.3fs" % float(Decimal(avg_search) / Decimal("3.0")))
self.remove_bundle(num)
def get_user_dn(self, name):
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index 6ab0d820222..08116d5d3ef 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -1099,7 +1099,7 @@ for env in ["simpleserver", "fileserver", "nt4_dc", "ad_dc", "ad_dc_ntvfs",
extra_path=[os.path.join(srcdir(), 'python/samba/tests')],
name="samba.tests.netlogonsvc.python(%s)" % env)
-for env in ["ktest", "ad_member", "ad_dc_no_ntlm" ]:
+for env in ["ktest", "ad_member", "ad_dc_no_ntlm"]:
planoldpythontestsuite(env, "ntlmdisabled",
extra_path=[os.path.join(srcdir(), 'python/samba/tests')],
name="samba.tests.ntlmdisabled.python(%s)" % env)
diff --git a/source4/torture/drs/python/repl_rodc.py b/source4/torture/drs/python/repl_rodc.py
index 6c6a9d29812..893bfcc037c 100644
--- a/source4/torture/drs/python/repl_rodc.py
+++ b/source4/torture/drs/python/repl_rodc.py
@@ -661,15 +661,15 @@ class DrsRodcTestCase(drs_base.DrsBaseTestCase):
def _create_rodc(self, ctx):
- ctx.nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn ]
- ctx.full_nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn ]
+ ctx.nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn]
+ ctx.full_nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn]
ctx.krbtgt_dn = "CN=krbtgt_%s,CN=Users,%s" % (ctx.myname, ctx.base_dn)
ctx.never_reveal_sid = ["<SID=%s-%s>" % (ctx.domsid, security.DOMAIN_RID_RODC_DENY),
"<SID=%s>" % security.SID_BUILTIN_ADMINISTRATORS,
"<SID=%s>" % security.SID_BUILTIN_SERVER_OPERATORS,
"<SID=%s>" % security.SID_BUILTIN_BACKUP_OPERATORS,
- "<SID=%s>" % security.SID_BUILTIN_ACCOUNT_OPERATORS ]
+ "<SID=%s>" % security.SID_BUILTIN_ACCOUNT_OPERATORS]
ctx.reveal_sid = "<SID=%s-%s>" % (ctx.domsid, security.DOMAIN_RID_RODC_ALLOW)
mysid = ctx.get_mysid()
diff --git a/wintest/test-s3.py b/wintest/test-s3.py
index 3272f277eaa..145aed96cb8 100755
--- a/wintest/test-s3.py
+++ b/wintest/test-s3.py
@@ -52,7 +52,7 @@ def test_wbinfo(t):
casefold=True)
t.cmd_contains("bin/wbinfo -u",
["${WIN_DOMAIN}/administrator",
- "${WIN_DOMAIN}/krbtgt" ],
+ "${WIN_DOMAIN}/krbtgt"],
casefold=True)
t.cmd_contains("bin/wbinfo -g",
["${WIN_DOMAIN}/domain users",
@@ -152,7 +152,7 @@ def join_as_member(t, vm):
t.setwinvars(vm)
t.info("Joining ${WIN_VM} as a member using net ads join")
t.port_wait("${WIN_IP}", 389)
- t.retry_cmd("host -t SRV _ldap._tcp.${WIN_REALM} ${WIN_IP}", ['has SRV record'] )
+ t.retry_cmd("host -t SRV _ldap._tcp.${WIN_REALM} ${WIN_IP}", ['has SRV record'])
t.cmd_contains("bin/net ads join -Uadministrator%${WIN_PASS}", ["Joined"])
t.cmd_contains("bin/net ads testjoin", ["Join is OK"])
t.cmd_contains("bin/net ads dns register ${HOSTNAME}.${WIN_REALM} -P", ["Successfully registered hostname with DNS"])
diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py
index e646d5b91c8..694f8c549e0 100755
--- a/wintest/test-s4-howto.py
+++ b/wintest/test-s4-howto.py
@@ -206,7 +206,7 @@ def test_dcpromo(t, vm):
# the first replication will transfer the dnsHostname attribute
t.cmd_contains("bin/samba-tool drs replicate ${HOSTNAME}.${LCREALM} ${WIN_HOSTNAME} CN=Configuration,${BASEDN} -k yes", ["was successful"])
- for nc in ['${BASEDN}', 'CN=Configuration,${BASEDN}', 'CN=Schema,CN=Configuration,${BASEDN}' ]:
+ for nc in ['${BASEDN}', 'CN=Configuration,${BASEDN}', 'CN=Schema,CN=Configuration,${BASEDN}']:
t.cmd_contains("bin/samba-tool drs replicate ${HOSTNAME}.${LCREALM} ${WIN_HOSTNAME}.${LCREALM} %s -k yes" % nc, ["was successful"])
t.cmd_contains("bin/samba-tool drs replicate ${WIN_HOSTNAME}.${LCREALM} ${HOSTNAME}.${LCREALM} %s -k yes" % nc, ["was successful"])
@@ -242,7 +242,7 @@ def test_dcpromo(t, vm):
"CN=Configuration,${BASEDN}",
"Last success",
"CN=Configuration,${BASEDN}",
- "Last success" ],
+ "Last success"],
ordered=True,
regex=True)
@@ -369,7 +369,7 @@ def test_dcpromo_rodc(t, vm):
child.expect("CN=Configuration,${BASEDN}")
child.expect("was successful")
- for nc in ['${BASEDN}', 'CN=Configuration,${BASEDN}', 'CN=Schema,CN=Configuration,${BASEDN}' ]:
+ for nc in ['${BASEDN}', 'CN=Configuration,${BASEDN}', 'CN=Schema,CN=Configuration,${BASEDN}']:
t.cmd_contains("bin/samba-tool drs replicate --add-ref ${WIN_HOSTNAME}.${LCREALM} ${HOSTNAME}.${LCREALM} %s" % nc, ["was successful"])
t.cmd_contains("bin/samba-tool drs showrepl ${HOSTNAME}.${LCREALM}",
@@ -380,7 +380,7 @@ def test_dcpromo_rodc(t, vm):
"CN=Configuration,${BASEDN}",
"Last attempt.*was successful",
"CN=Configuration,${BASEDN}",
- "Last attempt.*was successful" ],
+ "Last attempt.*was successful"],
ordered=True,
regex=True)
@@ -411,9 +411,9 @@ def join_as_dc(t, vm):
t.setwinvars(vm)
t.info("Joining ${WIN_VM} as a second DC using samba-tool domain join DC")
t.port_wait("${WIN_IP}", 389)
- t.retry_cmd("host -t SRV _ldap._tcp.${WIN_REALM} ${WIN_IP}", ['has SRV record'] )
+ t.retry_cmd("host -t SRV _ldap._tcp.${WIN_REALM} ${WIN_IP}", ['has SRV record'])
- t.retry_cmd("bin/samba-tool drs showrepl ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator%${WIN_PASS}", ['INBOUND NEIGHBORS'] )
+ t.retry_cmd("bin/samba-tool drs showrepl ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator%${WIN_PASS}", ['INBOUND NEIGHBORS'])
t.run_cmd('bin/samba-tool domain join ${WIN_REALM} DC -Uadministrator%${WIN_PASS} -d${DEBUGLEVEL} --option=interfaces=${INTERFACE}')
t.run_cmd('bin/samba-tool drs kcc ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%${WIN_PASS}')
@@ -432,7 +432,7 @@ def test_join_as_dc(t, vm):
t.run_cmd('bin/samba-tool drs kcc ${HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%${WIN_PASS}')
t.kinit("administrator@${WIN_REALM}", "${WIN_PASS}")
- for nc in ['${WIN_BASEDN}', 'CN=Configuration,${WIN_BASEDN}', 'CN=Schema,CN=Configuration,${WIN_BASEDN}' ]:
+ for nc in ['${WIN_BASEDN}', 'CN=Configuration,${WIN_BASEDN}', 'CN=Schema,CN=Configuration,${WIN_BASEDN}']:
t.cmd_contains("bin/samba-tool drs replicate ${HOSTNAME}.${WIN_REALM} ${WIN_HOSTNAME}.${WIN_REALM} %s -k yes" % nc, ["was successful"])
t.cmd_contains("bin/samba-tool drs replicate ${WIN_HOSTNAME}.${WIN_REALM} ${HOSTNAME}.${WIN_REALM} %s -k yes" % nc, ["was successful"])
@@ -489,8 +489,8 @@ def join_as_rodc(t, vm):
t.setwinvars(vm)
t.info("Joining ${WIN_VM} as a RODC using samba-tool domain join DC")
t.port_wait("${WIN_IP}", 389)
- t.retry_cmd("host -t SRV _ldap._tcp.${WIN_REALM} ${WIN_IP}", ['has SRV record'] )
- t.retry_cmd("bin/samba-tool drs showrepl ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator%${WIN_PASS}", ['INBOUND NEIGHBORS'] )
+ t.retry_cmd("host -t SRV _ldap._tcp.${WIN_REALM} ${WIN_IP}", ['has SRV record'])
+ t.retry_cmd("bin/samba-tool drs showrepl ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator%${WIN_PASS}", ['INBOUND NEIGHBORS'])
t.run_cmd('bin/samba-tool domain join ${WIN_REALM} RODC -Uadministrator%${WIN_PASS} -d${DEBUGLEVEL} --option=interfaces=${INTERFACE}')
t.run_cmd('bin/samba-tool drs kcc ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%${WIN_PASS}')
@@ -509,7 +509,7 @@ def test_join_as_rodc(t, vm):
t.run_cmd('bin/samba-tool drs kcc ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%${WIN_PASS}')
t.kinit("administrator@${WIN_REALM}", "${WIN_PASS}")
- for nc in ['${WIN_BASEDN}', 'CN=Configuration,${WIN_BASEDN}', 'CN=Schema,CN=Configuration,${WIN_BASEDN}' ]:
+ for nc in ['${WIN_BASEDN}', 'CN=Configuration,${WIN_BASEDN}', 'CN=Schema,CN=Configuration,${WIN_BASEDN}']:
t.cmd_contains("bin/samba-tool drs replicate ${HOSTNAME}.${WIN_REALM} ${WIN_HOSTNAME}.${WIN_REALM} %s -k yes" % nc, ["was successful"])
retries = 10
@@ -534,7 +534,7 @@ def test_join_as_rodc(t, vm):
"CN=Configuration,${WIN_BASEDN}",
"Last attempt .* was successful",
"CN=Configuration,${WIN_BASEDN}",
- "Last attempt .* was successful" ],
+ "Last attempt .* was successful"],
ordered=True,
regex=True)
diff --git a/wintest/wintest.py b/wintest/wintest.py
index bd6d6ae4dca..ad177cdb77d 100644
--- a/wintest/wintest.py
+++ b/wintest/wintest.py
@@ -880,7 +880,7 @@ RebootOnCompletion=No
# Give DNS registration a kick
child.sendline("ipconfig /registerdns")
- self.retry_cmd("host -t SRV _ldap._tcp.${WIN_REALM} ${WIN_IP}", ['has SRV record'], retries=60, delay=5 )
+ self.retry_cmd("host -t SRV _ldap._tcp.${WIN_REALM} ${WIN_IP}", ['has SRV record'], retries=60, delay=5)
def start_winvm(self, vm):