mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-08-29 15:12:18 +00:00
injector: ignore lines without '=' separator
This commit is contained in:
parent
f3a79838e6
commit
798d5cb2a7
3
injector
3
injector
@ -24,6 +24,9 @@ args = parser.parse_args()
|
|||||||
|
|
||||||
f = open(args.hostsfile, 'r')
|
f = open(args.hostsfile, 'r')
|
||||||
for line in f:
|
for line in f:
|
||||||
|
if line.find('=') == -1:
|
||||||
|
print 'Invalid line: %s' % line
|
||||||
|
continue
|
||||||
entry = line.split('=')
|
entry = line.split('=')
|
||||||
try:
|
try:
|
||||||
hostname = validate_hostname(entry[0])
|
hostname = validate_hostname(entry[0])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user