mirror of
https://github.com/nikdoof/rpzhole.git
synced 2025-12-22 22:29:33 +00:00
Make comments use correct comment character
This commit is contained in:
@@ -53,7 +53,7 @@ seenbefore = {}
|
||||
commentstart = ';' # for bind
|
||||
def addcomment ( comment ):
|
||||
global outputdata
|
||||
outputdata += ";%s\n" % comment
|
||||
outputdata += "%s%s\n" % (commentstart,comment)
|
||||
def addhost ( host ):
|
||||
global outputdata
|
||||
host = host.lower().strip()
|
||||
|
||||
@@ -59,7 +59,7 @@ seenbefore = {}
|
||||
commentstart = '#' # for hosts / dnsmasq
|
||||
def addcomment ( comment ):
|
||||
global outputdata
|
||||
outputdata += ";%s\n" % comment
|
||||
outputdata += "%s%s\n" % (commentstart,comment)
|
||||
def addhost ( host ):
|
||||
global outputdata
|
||||
host = host.lower().strip()
|
||||
@@ -140,6 +140,7 @@ if 'localblacklist' in config:
|
||||
for host in config['localblacklist']:
|
||||
addhost ( host )
|
||||
|
||||
|
||||
# write the config['hostsfile'] file
|
||||
with open ( config['hostsfile']+'.TMP', 'wt' ) as f:
|
||||
f.write ( outputdata )
|
||||
|
||||
Reference in New Issue
Block a user