Skip to content

Commit

Permalink
PEP8: fix E703: statement ends with a semicolon
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Guo <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
Reviewed-by: Douglas Bagnall <[email protected]>
  • Loading branch information
catalyst-joe-guo authored and douglasbagnall committed Aug 24, 2018
1 parent d23170c commit cabb299
Show file tree
Hide file tree
Showing 19 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion python/samba/dbchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ def err_missing_parent(self, obj):
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)
Expand Down
2 changes: 1 addition & 1 deletion python/samba/drs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions python/samba/netcmd/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ def run(self, sambaopts=None, credopts=None,
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)

Expand Down Expand Up @@ -1963,7 +1963,7 @@ def generic_enum_to_string(self, e_dict, v, names_only=False):
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):

Expand All @@ -1984,7 +1984,7 @@ def generic_bitmap_to_string(self, b_dict, v, names_only=False):
if names_only:
return w
r = "0x%x (%s)" % (v, w)
return r;
return r

def trustType_string(self, v):
types = {
Expand Down Expand Up @@ -2226,7 +2226,7 @@ def run(self, domain, sambaopts=None, versionopts=None, localdcopts=None):
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)
Expand Down
2 changes: 1 addition & 1 deletion python/samba/netcmd/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,7 @@ def load_cache():
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
Expand Down
2 changes: 1 addition & 1 deletion python/samba/provision/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/samba/provision/sambadns.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions python/samba/tests/password_hash_gpgme.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_default_supplementalCredentials(self):
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()

Expand Down Expand Up @@ -85,7 +85,7 @@ def test_supplementalCredentials_cleartext(self):
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()

Expand Down
4 changes: 2 additions & 2 deletions python/samba/tests/py_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ def create_user_account(self):
#
# 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"]

Expand Down
10 changes: 5 additions & 5 deletions python/samba/tests/samba3sam.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class Target:

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}
Expand Down Expand Up @@ -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"""
Expand Down Expand Up @@ -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."""
Expand Down
4 changes: 2 additions & 2 deletions python/samba/tests/smb.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_unlink(self):
"""
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))

Expand Down Expand Up @@ -94,7 +94,7 @@ def test_save_load_utfcontents(self):
# 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,
Expand Down
4 changes: 2 additions & 2 deletions python/samba/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,13 +621,13 @@ def upgrade_from_samba3(samba3, logger, targetdir, session_info=None,
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)
Expand Down
2 changes: 1 addition & 1 deletion script/generate_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion source3/build/charset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion source4/dsdb/tests/python/password_lockout.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ def _test_unicodePwd_lockout_with_clear_change(self, creds, other_ldb,
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,
Expand Down
2 changes: 1 addition & 1 deletion source4/scripting/devel/pfm_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion source4/selftest/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def plansmbtorture4testsuite(name, env, options, modname=None):
# 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
Expand Down
4 changes: 2 additions & 2 deletions source4/torture/drs/python/repl_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def _check_metadata(self, user_dn, sam_ldb, drs, metadata, expected):
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
Expand All @@ -181,7 +181,7 @@ def _check_metadata(self, user_dn, sam_ldb, drs, metadata, expected):
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,
Expand Down
2 changes: 1 addition & 1 deletion wintest/test-s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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>")
Expand Down
4 changes: 2 additions & 2 deletions wintest/wintest.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def set_nameserver(self, nameserver):
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}')
Expand Down Expand Up @@ -737,7 +737,7 @@ def open_telnet(self, hostname, username, password, retries=60, delay=5, set_tim
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:")
Expand Down

0 comments on commit cabb299

Please sign in to comment.