1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-24 10:50:22 +03:00

PEP8: fix E703: statement ends with a semicolon

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:22:11 +12:00 committed by Douglas Bagnall
parent d23170c961
commit cabb299749
19 changed files with 32 additions and 32 deletions

View File

@ -800,7 +800,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
keep_transaction = False
self.samdb.transaction_start()
try:
nc_root = self.samdb.get_nc_root(obj.dn);
nc_root = self.samdb.get_nc_root(obj.dn)
lost_and_found = self.samdb.get_wellknown_dn(nc_root, dsdb.DS_GUID_LOSTANDFOUND_CONTAINER)
new_dn = ldb.Dn(self.samdb, str(obj.dn))
new_dn.remove_base_components(len(new_dn) - 1)

View File

@ -80,7 +80,7 @@ def sendDsReplicaSync(drsuapiBind, drsuapi_handle, source_dsa_guid,
nc.dn = naming_context
req1 = drsuapi.DsReplicaSyncRequest1()
req1.naming_context = nc;
req1.naming_context = nc
req1.options = req_option
req1.source_dsa_guid = misc.GUID(source_dsa_guid)

View File

@ -850,7 +850,7 @@ class cmd_domain_demote(Command):
nc.dn = str(part)
req1 = drsuapi.DsReplicaSyncRequest1()
req1.naming_context = nc;
req1.naming_context = nc
req1.options = drsuapi.DRSUAPI_DRS_WRIT_REP
req1.source_dsa_guid = misc.GUID(ntds_guid)
@ -1963,7 +1963,7 @@ class DomainTrustCommand(Command):
w = "__unknown__%08X__" % v32
r = "0x%x (%s)" % (v, w)
return r;
return r
def generic_bitmap_to_string(self, b_dict, v, names_only=False):
@ -1984,7 +1984,7 @@ class DomainTrustCommand(Command):
if names_only:
return w
r = "0x%x (%s)" % (v, w)
return r;
return r
def trustType_string(self, v):
types = {
@ -2226,7 +2226,7 @@ class cmd_domain_trust_show(DomainTrustCommand):
local_tdo_forest.count = 0
local_tdo_forest.entries = []
self.outf.write("TrustedDomain:\n\n");
self.outf.write("TrustedDomain:\n\n")
self.outf.write("NetbiosName: %s\n" % local_tdo_info.netbios_name.string)
if local_tdo_info.netbios_name.string != local_tdo_info.domain_name.string:
self.outf.write("DnsName: %s\n" % local_tdo_info.domain_name.string)

View File

@ -1867,7 +1867,7 @@ samba-tool user syncpasswords --terminate \\
self.samdb_url = H
self.dirsync_filter = dirsync_filter
self.dirsync_attrs = dirsync_attrs
self.dirsync_controls = ["dirsync:1:0:0", "extended_dn:1:0"];
self.dirsync_controls = ["dirsync:1:0:0", "extended_dn:1:0"]
self.password_attrs = password_attrs
self.decrypt_samba_gpg = decrypt_samba_gpg
self.sync_command = sync_command

View File

@ -2203,7 +2203,7 @@ def provision(logger, session_info, smbconf=None,
paths = provision_paths_from_lp(lp, names.dnsdomain)
paths.bind_gid = bind_gid
paths.root_uid = root_uid;
paths.root_uid = root_uid
paths.root_gid = root_gid
hostip = determine_host_ip(logger, lp, hostip)

View File

@ -235,7 +235,7 @@ class AgingEnabledTimeProperty(dnsp.DnsProperty):
def __init__(self, next_cycle_hours=0):
super(AgingEnabledTimeProperty, self).__init__()
self.wDataLength = 1
self.version = 1;
self.version = 1
self.id = dnsp.DSPROPERTY_ZONE_AGING_ENABLED_TIME
self.data = next_cycle_hours

View File

@ -47,7 +47,7 @@ class PassWordHashGpgmeTests(PassWordHashTests):
self.add_user()
if not self.lp.get("password hash gpg key ids"):
self.skipTest("No password hash gpg key ids, " +
"Primary:SambaGPG will not be generated");
"Primary:SambaGPG will not be generated")
sc = self.get_supplemental_creds()
@ -85,7 +85,7 @@ class PassWordHashGpgmeTests(PassWordHashTests):
self.add_user(clear_text=True)
if not self.lp.get("password hash gpg key ids"):
self.skipTest("No password hash gpg key ids, " +
"Primary:SambaGPG will not be generated");
"Primary:SambaGPG will not be generated")
sc = self.get_supplemental_creds()

View File

@ -315,8 +315,8 @@ class PyCredentialsTests(TestCase):
#
# Get the authenticator from the machine creds.
def get_authenticator(self, c):
auth = self.machine_creds.new_client_authenticator();
current = netr_Authenticator()
auth = self.machine_creds.new_client_authenticator()
current = netr_Authenticator()
current.cred.data = [ord(x) for x in auth["credential"]]
current.timestamp = auth["timestamp"]

View File

@ -86,7 +86,7 @@ class MapBaseTestCase(TestCaseInTempDir):
def __init__(self, basedn, dn, lp):
self.db = Ldb(lp=lp, session_info=system_session())
self.db.set_opaque("skip_allocate_sids", "true");
self.db.set_opaque("skip_allocate_sids", "true")
self.basedn = basedn
self.basedn_casefold = ldb.Dn(self.db, basedn).get_casefold()
self.substvars = {"BASEDN": self.basedn}
@ -141,14 +141,14 @@ class Samba3SamTestCase(MapBaseTestCase):
def setUp(self):
super(Samba3SamTestCase, self).setUp()
ldb = Ldb(self.ldburl, lp=self.lp, session_info=system_session())
ldb.set_opaque("skip_allocate_sids", "true");
ldb.set_opaque("skip_allocate_sids", "true")
self.samba3.setup_data("samba3.ldif")
ldif = read_datafile("provision_samba3sam.ldif")
ldb.add_ldif(self.samba4.subst(ldif))
self.setup_modules(ldb, self.samba3, self.samba4)
del ldb
self.ldb = Ldb(self.ldburl, lp=self.lp, session_info=system_session())
self.ldb.set_opaque("skip_allocate_sids", "true");
self.ldb.set_opaque("skip_allocate_sids", "true")
def test_search_non_mapped(self):
"""Looking up by non-mapped attribute"""
@ -310,13 +310,13 @@ class MapTestCase(MapBaseTestCase):
def setUp(self):
super(MapTestCase, self).setUp()
ldb = Ldb(self.ldburl, lp=self.lp, session_info=system_session())
ldb.set_opaque("skip_allocate_sids", "true");
ldb.set_opaque("skip_allocate_sids", "true")
ldif = read_datafile("provision_samba3sam.ldif")
ldb.add_ldif(self.samba4.subst(ldif))
self.setup_modules(ldb, self.samba3, self.samba4)
del ldb
self.ldb = Ldb(self.ldburl, lp=self.lp, session_info=system_session())
self.ldb.set_opaque("skip_allocate_sids", "true");
self.ldb.set_opaque("skip_allocate_sids", "true")
def test_map_search(self):
"""Running search tests on mapped data."""

View File

@ -61,7 +61,7 @@ class SMBTests(samba.tests.TestCase):
"""
The smb.unlink API should delete file
"""
self.conn.savefile(test_file, binary_contents);
self.conn.savefile(test_file, binary_contents)
self.conn.unlink(test_file)
self.assertFalse(self.conn.chkpath(test_file))
@ -94,7 +94,7 @@ class SMBTests(samba.tests.TestCase):
# with python2 this will save/load str type
# with python3 this will save/load bytes type
def test_save_binary_contents(self):
self.conn.savefile(test_file, binary_contents);
self.conn.savefile(test_file, binary_contents)
contents = self.conn.loadfile(test_file)
self.assertEquals(contents, binary_contents,

View File

@ -621,13 +621,13 @@ Please fix this account before attempting to upgrade again
admin_user = username
try:
group_memberships = s3db.enum_group_memberships(user);
group_memberships = s3db.enum_group_memberships(user)
for group in group_memberships:
if str(group) in groupmembers:
if user.user_sid not in groupmembers[str(group)]:
groupmembers[str(group)].append(user.user_sid)
else:
groupmembers[str(group)] = [user.user_sid];
groupmembers[str(group)] = [user.user_sid]
except passdb.error as e:
logger.warn("Ignoring group memberships of '%s' %s: %s",
username, user.user_sid, e)

View File

@ -397,7 +397,7 @@ def make_param_table(path_in, path_out):
file_out.write("\t\t.flags\t\t= %s,\n" % flags)
file_out.write("\t},\n")
file_out.write("\n\t{NULL, P_BOOL, P_NONE, 0, NULL, NULL, 0}\n");
file_out.write("\n\t{NULL, P_BOOL, P_NONE, 0, NULL, NULL, 0}\n")
file_out.write("};\n")
file_out.write("\n#endif /* %s */\n\n" % header)
finally:

View File

@ -36,7 +36,7 @@ def CHECK_SAMBA3_CHARSET(conf, crossbuild=False):
if default_dos_charset is False or default_unix_charset is False:
# we found iconv, but it failed to convert anything (e.g. on AIX)
conf.undefine('HAVE_NATIVE_ICONV');
conf.undefine('HAVE_NATIVE_ICONV')
default_dos_charset = "ASCII"
default_unix_charset = "UTF-8"

View File

@ -846,7 +846,7 @@ unicodePwd:: """ + base64.b64encode(invalid_utf16).decode('utf8') + """
msDSUserAccountControlComputed=dsdb.UF_LOCKOUT)
# Now reset the lockout, by removing ACB_AUTOLOCK (which removes the lock, despite being a generated attribute)
self._reset_samr(res);
self._reset_samr(res)
res = self._check_account(userdn,
badPwdCount=0,

View File

@ -58,7 +58,7 @@ def _samdb_fetch_schi(samdb):
str(res[0]['schemaInfo']))
else:
pfm_schi = drsblobs.schemaInfoBlob()
pfm_schi.marker = 0xFF;
pfm_schi.marker = 0xFF
return pfm_schi

View File

@ -390,7 +390,7 @@ for t in smbtorture4_testsuites("dlz_bind9."):
# The dlz_bind9 tests needs to look at the DNS database
plansmbtorture4testsuite(t, "chgdcpass:local", ["ncalrpc:$SERVER", '-U$USERNAME%$PASSWORD'])
planpythontestsuite("nt4_dc", "samba.tests.libsmb_samba_internal", py3_compatible=True);
planpythontestsuite("nt4_dc", "samba.tests.libsmb_samba_internal", py3_compatible=True)
# Blackbox Tests:
# tests that interact directly with the command-line tools rather than using

View File

@ -172,7 +172,7 @@ class DrsMoveObjectTestCase(drs_base.DrsBaseTestCase):
for o in drs_ctr.first_object.meta_data_ctr.meta_data:
i = 0
drs_attid = drs_ctr.first_object.object.attribute_ctr.attributes[att_idx]
e = expected[i];
e = expected[i]
(attid, orig_dsa, version) = e
# Skip the RDN from the expected set, it is not sent over DRS
@ -181,7 +181,7 @@ class DrsMoveObjectTestCase(drs_base.DrsBaseTestCase):
or (user_dn.get_rdn_name().upper() == "OU"
and attid == DRSUAPI_ATTID_ou):
i = i + 1
e = expected[i];
e = expected[i]
(attid, orig_dsa, version) = e
self.assertEquals(attid, drs_attid.attid,

View File

@ -176,7 +176,7 @@ def create_root_account(t, vm):
child = t.pexpect_spawn('bin/net ads password root -Uadministrator%${WIN_PASS}')
child.expect("Enter new password for root")
child.sendline("${PASSWORD2}")
child.expect("Password change for ");
child.expect("Password change for ")
child.expect(" completed")
child = t.pexpect_spawn('bin/net rpc shell -S ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator%${WIN_PASS}')
child.expect("net rpc>")

View File

@ -329,7 +329,7 @@ nameserver %s
self.write_file('/etc/resolv.conf.wintest', contents, mode='a')
self.write_file('/etc/resolv.conf.wintest-bak', contents)
self.run_cmd("mv -f /etc/resolv.conf.wintest /etc/resolv.conf")
self.resolv_conf_backup = '/etc/resolv.conf.wintest-bak';
self.resolv_conf_backup = '/etc/resolv.conf.wintest-bak'
def configure_bind(self, kerberos_support=False, include=None):
self.chdir('${PREFIX}')
@ -737,7 +737,7 @@ options {
if set_dns:
set_dns = False
if self.set_dns(child):
continue;
continue
if set_route:
child.sendline('route add 0.0.0.0 mask 0.0.0.0 ${WIN_DEFAULT_GATEWAY}')
child.expect("C:")