mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 11:10:21 -07:00
Merge branch 'Mbosco-patch-1' into devel
This commit is contained in:
commit
5d65c1c4a4
1 changed files with 9 additions and 3 deletions
|
@ -220,9 +220,15 @@ class Connection(object):
|
||||||
if not os.path.exists(hf):
|
if not os.path.exists(hf):
|
||||||
hfiles_not_found += 1
|
hfiles_not_found += 1
|
||||||
continue
|
continue
|
||||||
host_fh = open(hf)
|
try:
|
||||||
data = host_fh.read()
|
host_fh = open(hf)
|
||||||
host_fh.close()
|
except IOError, e:
|
||||||
|
hfiles_not_found += 1
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
data = host_fh.read()
|
||||||
|
host_fh.close()
|
||||||
|
|
||||||
for line in data.split("\n"):
|
for line in data.split("\n"):
|
||||||
if line is None or " " not in line:
|
if line is None or " " not in line:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue