Host file now lists 127.0.0.1 localhost, 0.0.0.0 the others.

This commit is contained in:
Steven Black 2015-10-06 17:05:09 -04:00
parent a89a3e2577
commit 4998b31f24

View File

@ -164,6 +164,7 @@ def removeDups(mergeFile):
mergeFile.seek(0) # reset file pointer
hostnames = set()
hostnames.add("localhost")
for line in mergeFile.readlines():
if line[0].startswith("#") or re.match(r'^\s*$', line[0]):
finalFile.write(line) #maintain the comments for readability
@ -218,6 +219,9 @@ def writeOpeningHeader(finalFile):
finalFile.write('#\n')
finalFile.write('# Merging these sources produced ' + str(numberOfRules) + ' unique entries\n')
finalFile.write('# ===============================================================\n')
finalFile.write('\n')
finalFile.write('127.0.0.1 localhost\n')
finalFile.write('\n')
finalFile.write(fileContents)
def updateReadme(numberOfRules):