diff options
author | Abhijeet Kasurde <akasurde@redhat.com> | 2023-05-24 20:58:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-24 20:58:42 +0200 |
commit | 9f4dfff69bfc9f33a487e1c7fee2fbce64c62c9c (patch) | |
tree | 089bfd9d062a6f3d2a83be24f72952f862c670e7 /test/support | |
parent | Remove unused test files (#80879) (diff) | |
download | ansible-9f4dfff69bfc9f33a487e1c7fee2fbce64c62c9c.tar.xz ansible-9f4dfff69bfc9f33a487e1c7fee2fbce64c62c9c.zip |
Pylint fixes (#80855)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Diffstat (limited to 'test/support')
6 files changed, 6 insertions, 6 deletions
diff --git a/test/support/integration/plugins/modules/timezone.py b/test/support/integration/plugins/modules/timezone.py index b7439a1272..dd3748387a 100644 --- a/test/support/integration/plugins/modules/timezone.py +++ b/test/support/integration/plugins/modules/timezone.py @@ -121,7 +121,7 @@ class Timezone(object): # running in the global zone where changing the timezone has no effect. zonename_cmd = module.get_bin_path('zonename') if zonename_cmd is not None: - (rc, stdout, _) = module.run_command(zonename_cmd) + (rc, stdout, stderr) = module.run_command(zonename_cmd) if rc == 0 and stdout.strip() == 'global': module.fail_json(msg='Adjusting timezone is not supported in Global Zone') @@ -731,7 +731,7 @@ class BSDTimezone(Timezone): # Strategy 3: # (If /etc/localtime is not symlinked) # Check all files in /usr/share/zoneinfo and return first non-link match. - for dname, _, fnames in sorted(os.walk(zoneinfo_dir)): + for dname, dirs, fnames in sorted(os.walk(zoneinfo_dir)): for fname in sorted(fnames): zoneinfo_file = os.path.join(dname, fname) if not os.path.islink(zoneinfo_file) and filecmp.cmp(zoneinfo_file, localtime_file): diff --git a/test/support/network-integration/collections/ansible_collections/ansible/netcommon/plugins/connection/network_cli.py b/test/support/network-integration/collections/ansible_collections/ansible/netcommon/plugins/connection/network_cli.py index 68eaa88759..d0d977faa6 100644 --- a/test/support/network-integration/collections/ansible_collections/ansible/netcommon/plugins/connection/network_cli.py +++ b/test/support/network-integration/collections/ansible_collections/ansible/netcommon/plugins/connection/network_cli.py @@ -1310,7 +1310,6 @@ class Connection(NetworkConnectionBase): remote host before triggering timeout exception :return: None """ - """Fetch file over scp/sftp from remote device""" ssh = self.ssh_type_conn._connect_uncached() if self.ssh_type == "libssh": self.ssh_type_conn.fetch_file(source, destination, proto=proto) diff --git a/test/support/network-integration/collections/ansible_collections/ansible/netcommon/plugins/module_utils/network/common/facts/facts.py b/test/support/network-integration/collections/ansible_collections/ansible/netcommon/plugins/module_utils/network/common/facts/facts.py index 477d318474..2afa650e43 100644 --- a/test/support/network-integration/collections/ansible_collections/ansible/netcommon/plugins/module_utils/network/common/facts/facts.py +++ b/test/support/network-integration/collections/ansible_collections/ansible/netcommon/plugins/module_utils/network/common/facts/facts.py @@ -79,7 +79,7 @@ class FactsBase(object): self._module.fail_json( msg="Subset must be one of [%s], got %s" % ( - ", ".join(sorted([item for item in valid_subsets])), + ", ".join(sorted(list(valid_subsets))), subset, ) ) diff --git a/test/support/network-integration/collections/ansible_collections/cisco/ios/plugins/modules/ios_config.py b/test/support/network-integration/collections/ansible_collections/cisco/ios/plugins/modules/ios_config.py index 1ea2af7353..d80261d7df 100644 --- a/test/support/network-integration/collections/ansible_collections/cisco/ios/plugins/modules/ios_config.py +++ b/test/support/network-integration/collections/ansible_collections/cisco/ios/plugins/modules/ios_config.py @@ -575,6 +575,7 @@ def main(): ) if running_config.sha1 != base_config.sha1: + before, after = "", "" if module.params["diff_against"] == "intended": before = running_config after = base_config diff --git a/test/support/network-integration/collections/ansible_collections/vyos/vyos/plugins/modules/vyos_command.py b/test/support/network-integration/collections/ansible_collections/vyos/vyos/plugins/modules/vyos_command.py index 369d58279e..cbfe6d3b08 100644 --- a/test/support/network-integration/collections/ansible_collections/vyos/vyos/plugins/modules/vyos_command.py +++ b/test/support/network-integration/collections/ansible_collections/vyos/vyos/plugins/modules/vyos_command.py @@ -192,7 +192,7 @@ def main(): interval = module.params["interval"] match = module.params["match"] - for _ in range(retries): + for dummy in range(retries): responses = run_commands(module, commands) for item in list(conditionals): diff --git a/test/support/windows-integration/plugins/action/win_copy.py b/test/support/windows-integration/plugins/action/win_copy.py index 70dbff6bad..79f72ef6af 100644 --- a/test/support/windows-integration/plugins/action/win_copy.py +++ b/test/support/windows-integration/plugins/action/win_copy.py @@ -439,7 +439,7 @@ class ActionModule(ActionBase): source_full = self._loader.get_real_file(source, decrypt=decrypt) except AnsibleFileNotFound as e: result['failed'] = True - result['msg'] = "could not find src=%s, %s" % (source_full, to_text(e)) + result['msg'] = "could not find src=%s, %s" % (source, to_text(e)) return result original_basename = os.path.basename(source) |