host: skip lines beginning with new line

This commit is contained in:
Rene Moser 2013-11-15 13:40:51 +01:00
parent ca5e5cfebc
commit a61f46f4f0

View file

@ -100,7 +100,7 @@ class Host(object):
f.close()
for lineno, line in enumerate(self._hostsfile_lines):
if line.startswith("#"):
if line.startswith("#") or line.startswith("\n"):
continue
ip = line.split()[0:1]