mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 20:01:25 -07:00
remove assigned but unused variables in module_utils.
These were mostly saving exceptions but not using them. Getting rid of those will help with eventually running modules via either python2.4 or python3.x.
This commit is contained in:
parent
c08648999d
commit
9ce3adbeb1
2 changed files with 19 additions and 14 deletions
|
@ -122,7 +122,7 @@ def not_in_host_file(self, host):
|
|||
|
||||
try:
|
||||
host_fh = open(hf)
|
||||
except IOError, e:
|
||||
except IOError:
|
||||
hfiles_not_found += 1
|
||||
continue
|
||||
else:
|
||||
|
@ -156,7 +156,6 @@ def add_host_key(module, fqdn, key_type="rsa", create_dir=False):
|
|||
|
||||
""" use ssh-keyscan to add the hostkey """
|
||||
|
||||
result = False
|
||||
keyscan_cmd = module.get_bin_path('ssh-keyscan', True)
|
||||
|
||||
if 'USER' in os.environ:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue