mirror of
https://github.com/minoplhy/filters-converter.git
synced 2024-12-22 10:08:08 +00:00
Solved Problem with number in unbound and dnsmasq and hosts
This commit is contained in:
parent
8a6201c399
commit
207820fdf5
@ -12,8 +12,10 @@ lst = []
|
||||
with open(infile, 'r') as f:
|
||||
for line in f:
|
||||
for word in a:
|
||||
if word in line:
|
||||
line = line.replace(word,'')
|
||||
if word in line and not line.startswith('#'):
|
||||
line = line.replace(word,'')
|
||||
else:
|
||||
line = line.replace(line, line)
|
||||
lst.append(line)
|
||||
f.close()
|
||||
with open(infile, 'w') as f:
|
||||
|
@ -12,8 +12,10 @@ lst = []
|
||||
with open(infile, 'r') as f:
|
||||
for line in f:
|
||||
for word in a:
|
||||
if word in line:
|
||||
if word in line and not line.startswith('#'):
|
||||
line = line.replace(word,'')
|
||||
else:
|
||||
line = line.replace(line, line)
|
||||
lst.append(line)
|
||||
f.close()
|
||||
with open(infile, 'w') as f:
|
||||
|
@ -13,8 +13,10 @@ lst = []
|
||||
with open(infile, 'r') as f:
|
||||
for line in f:
|
||||
for word in a:
|
||||
if word in line:
|
||||
if word in line and not line.startswith('#'):
|
||||
line = line.replace(word,'')
|
||||
else:
|
||||
line = line.replace(line, line)
|
||||
lst.append(line)
|
||||
f.close()
|
||||
with open(infile, 'w') as f:
|
||||
|
Loading…
Reference in New Issue
Block a user