mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-06 12:32:35 +02:00
Update to include preamble handling
This commit is contained in:
parent
56e956e99a
commit
7934f87b41
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):
|
||||||
|
Loading…
Reference in New Issue
Block a user