host: skip lines beginning with new line

This commit is contained in:
Rene Moser 2013-11-15 13:40:51 +01:00
parent 502d9f43e5
commit ee9dc73a63

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]