1
0
mirror of https://github.com/r4sas/py-i2phosts synced 2025-03-10 04:11:02 +00:00

injector: ignore lines without '=' separator

This commit is contained in:
Hidden Z 2010-10-16 19:44:00 +00:00
parent f3a79838e6
commit 798d5cb2a7

View File

@ -24,6 +24,9 @@ args = parser.parse_args()
f = open(args.hostsfile, 'r')
for line in f:
if line.find('=') == -1:
print 'Invalid line: %s' % line
continue
entry = line.split('=')
try:
hostname = validate_hostname(entry[0])