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:
Toshio Kuratomi 2015-11-03 09:51:21 -08:00
parent c08648999d
commit 9ce3adbeb1
2 changed files with 19 additions and 14 deletions

View file

@ -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: