Skip to content

Commit

Permalink
Merge branch 'patch-1' of https://github.com/Mbosco/ansible into Mbos…
Browse files Browse the repository at this point in the history
…co-patch-1
  • Loading branch information
jimi-c committed Jun 23, 2014
2 parents 9564818 + 39fcbd1 commit 1702c2f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/ansible/runner/connection_plugins/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,15 @@ def not_in_host_file(self, host):
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
Expand Down

0 comments on commit 1702c2f

Please sign in to comment.