Solved Problem with number in unbound and dnsmasq and hosts

This commit is contained in:
Minoplhy 2021-06-03 12:58:01 +07:00
parent 8a6201c399
commit 207820fdf5
3 changed files with 10 additions and 4 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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: