mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-07-01 02:36:52 +00:00
Update to include preamble handling
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
myhosts
|
||||||
@@ -277,6 +277,12 @@ def writeOpeningHeader(finalFile):
|
|||||||
writeData(finalFile, '\n')
|
writeData(finalFile, '\n')
|
||||||
writeData(finalFile, '127.0.0.1 localhost\n')
|
writeData(finalFile, '127.0.0.1 localhost\n')
|
||||||
writeData(finalFile, '\n')
|
writeData(finalFile, '\n')
|
||||||
|
|
||||||
|
preamble = os.path.join(BASEDIR_PATH, "myhosts");
|
||||||
|
if os.path.isfile(preamble):
|
||||||
|
with open(preamble, "r") as f:
|
||||||
|
writeData(finalFile, f.read());
|
||||||
|
|
||||||
finalFile.write(fileContents)
|
finalFile.write(fileContents)
|
||||||
|
|
||||||
def updateReadme(numberOfRules):
|
def updateReadme(numberOfRules):
|
||||||
|
|||||||
Reference in New Issue
Block a user