mirror of
https://github.com/nikdoof/rpzhole.git
synced 2025-12-24 23:29:28 +00:00
Make comments use correct comment character
This commit is contained in:
@@ -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