diff options
-rw-r--r-- | python/samba/dbchecker.py | 2 | ||||
-rw-r--r-- | python/samba/drs_utils.py | 2 | ||||
-rw-r--r-- | python/samba/netcmd/domain.py | 8 | ||||
-rw-r--r-- | python/samba/netcmd/user.py | 2 | ||||
-rw-r--r-- | python/samba/provision/__init__.py | 2 | ||||
-rw-r--r-- | python/samba/provision/sambadns.py | 2 | ||||
-rw-r--r-- | python/samba/tests/password_hash_gpgme.py | 4 | ||||
-rw-r--r-- | python/samba/tests/py_credentials.py | 4 | ||||
-rw-r--r-- | python/samba/tests/samba3sam.py | 10 | ||||
-rw-r--r-- | python/samba/tests/smb.py | 4 | ||||
-rw-r--r-- | python/samba/upgrade.py | 4 | ||||
-rw-r--r-- | script/generate_param.py | 2 | ||||
-rw-r--r-- | source3/build/charset.py | 2 | ||||
-rwxr-xr-x | source4/dsdb/tests/python/password_lockout.py | 2 | ||||
-rwxr-xr-x | source4/scripting/devel/pfm_verify.py | 2 | ||||
-rwxr-xr-x | source4/selftest/tests.py | 2 | ||||
-rw-r--r-- | source4/torture/drs/python/repl_move.py | 4 | ||||
-rwxr-xr-x | wintest/test-s3.py | 2 | ||||
-rw-r--r-- | wintest/wintest.py | 4 |
19 files changed, 32 insertions, 32 deletions
diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py index bdc1874f563..dfdbcf46655 100644 --- a/python/samba/dbchecker.py +++ b/python/samba/dbchecker.py @@ -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) diff --git a/python/samba/drs_utils.py b/python/samba/drs_utils.py index 4db8fa00a58..7573b62b11c 100644 --- a/python/samba/drs_utils.py +++ b/python/samba/drs_utils.py @@ -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) diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py index 84ed5a51111..7bee4bb2eaa 100644 --- a/python/samba/netcmd/domain.py +++ b/python/samba/netcmd/domain.py @@ -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) diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py index b14700213d5..06a7f545cb2 100644 --- a/python/samba/netcmd/user.py +++ b/python/samba/netcmd/user.py @@ -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 diff --git a/python/samba/provision/__init__.py b/python/samba/provision/__init__.py index f9313afa1ed..dccce3d83f2 100644 --- a/python/samba/provision/__init__.py +++ b/python/samba/provision/__init__.py @@ -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) diff --git a/python/samba/provision/sambadns.py b/python/samba/provision/sambadns.py index ff38e22ce92..f948feb60cd 100644 --- a/python/samba/provision/sambadns.py +++ b/python/samba/provision/sambadns.py @@ -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 diff --git a/python/samba/tests/password_hash_gpgme.py b/python/samba/tests/password_hash_gpgme.py index 2834ab557c0..20c07e61967 100644 --- a/python/samba/tests/password_hash_gpgme.py +++ b/python/samba/tests/password_hash_gpgme.py @@ -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() diff --git a/python/samba/tests/py_credentials.py b/python/samba/tests/py_credentials.py index e0846d58056..bcf5d3a0a29 100644 --- a/python/samba/tests/py_credentials.py +++ b/python/samba/tests/py_credentials.py @@ -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"] diff --git a/python/samba/tests/samba3sam.py b/python/samba/tests/samba3sam.py index 10b6408ca79..5223e7cee60 100644 --- a/python/samba/tests/samba3sam.py +++ b/python/samba/tests/samba3sam.py @@ -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.""" diff --git a/python/samba/tests/smb.py b/python/samba/tests/smb.py index 8f6b13193f5..e0e60e37102 100644 --- a/python/samba/tests/smb.py +++ b/python/samba/tests/smb.py @@ -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, diff --git a/python/samba/upgrade.py b/python/samba/upgrade.py index 669a6b5e880..7207835b95c 100644 --- a/python/samba/upgrade.py +++ b/python/samba/upgrade.py @@ -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) diff --git a/script/generate_param.py b/script/generate_param.py index c9f18b1cdd1..2abe6ca4211 100644 --- a/script/generate_param.py +++ b/script/generate_param.py @@ -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: diff --git a/source3/build/charset.py b/source3/build/charset.py index 0f4f3194205..bdb818f83ea 100644 --- a/source3/build/charset.py +++ b/source3/build/charset.py @@ -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" diff --git a/source4/dsdb/tests/python/password_lockout.py b/source4/dsdb/tests/python/password_lockout.py index 9197d9aa266..be688475af2 100755 --- a/source4/dsdb/tests/python/password_lockout.py +++ b/source4/dsdb/tests/python/password_lockout.py @@ -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, diff --git a/source4/scripting/devel/pfm_verify.py b/source4/scripting/devel/pfm_verify.py index 95288df56d3..4d4e0c9536f 100755 --- a/source4/scripting/devel/pfm_verify.py +++ b/source4/scripting/devel/pfm_verify.py @@ -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 diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 2a340155c8f..0b418663325 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -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 diff --git a/source4/torture/drs/python/repl_move.py b/source4/torture/drs/python/repl_move.py index 9a64d465de8..d65d173013a 100644 --- a/source4/torture/drs/python/repl_move.py +++ b/source4/torture/drs/python/repl_move.py @@ -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, diff --git a/wintest/test-s3.py b/wintest/test-s3.py index 1c013e908a7..71f5f775674 100755 --- a/wintest/test-s3.py +++ b/wintest/test-s3.py @@ -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>") diff --git a/wintest/wintest.py b/wintest/wintest.py index bf1b04d8774..4af7eb77b1d 100644 --- a/wintest/wintest.py +++ b/wintest/wintest.py @@ -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:") |