mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-16 05:41:04 +00:00
Merge branch 'Mbosco-patch-1' into devel
This commit is contained in:
@@ -220,9 +220,15 @@ class Connection(object):
|
||||
if not os.path.exists(hf):
|
||||
hfiles_not_found += 1
|
||||
continue
|
||||
host_fh = open(hf)
|
||||
data = host_fh.read()
|
||||
host_fh.close()
|
||||
try:
|
||||
host_fh = open(hf)
|
||||
except IOError, e:
|
||||
hfiles_not_found += 1
|
||||
continue
|
||||
else:
|
||||
data = host_fh.read()
|
||||
host_fh.close()
|
||||
|
||||
for line in data.split("\n"):
|
||||
if line is None or " " not in line:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user