mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
host: skip lines beginning with new line
This commit is contained in:
parent
ca5e5cfebc
commit
a61f46f4f0
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ class Host(object):
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
for lineno, line in enumerate(self._hostsfile_lines):
|
for lineno, line in enumerate(self._hostsfile_lines):
|
||||||
if line.startswith("#"):
|
if line.startswith("#") or line.startswith("\n"):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
ip = line.split()[0:1]
|
ip = line.split()[0:1]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue