mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-04 03:26:12 +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, '127.0.0.1 localhost\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)
|
||||
|
||||
def updateReadme(numberOfRules):
|
||||
|
|
Loading…
Reference in New Issue
Block a user