git.99rst.org
/
stevenblack-hosts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
ec5178b
)
Create the output folder if it doesn't pre-exist.
author
Steven Black
<redacted>
Sun, 13 Mar 2016 04:44:23 +0000
(23:44 -0500)
committer
Steven Black
<redacted>
Sun, 13 Mar 2016 04:44:23 +0000
(23:44 -0500)
updateHostsFile.py
patch
|
blob
|
history
diff --git
a/updateHostsFile.py
b/updateHostsFile.py
index 903966ce94410bc19d29a2e303f1631277d4b566..32dcb596946a4d2e08500ab15bc8b6bbf2d573b1 100644
(file)
--- a/
updateHostsFile.py
+++ b/
updateHostsFile.py
@@
-288,7
+288,7
@@
def removeDupsAndExcl(mergeFile):
os.makedirs(outputPath)
# Another mode is required to read and write the file in Python 3
- finalFile = open(os.path.join(outputPath, 'hosts'), '
r+b
')
+ finalFile = open(os.path.join(outputPath, 'hosts'), '
w+
')
mergeFile.seek(0) # reset file pointer
hostnames = set()
git clone https://git.99rst.org/PROJECT