Fixes #102.
authorSteven Black <redacted>
Sun, 13 Mar 2016 15:24:17 +0000 (11:24 -0400)
committerSteven Black <redacted>
Sun, 13 Mar 2016 15:24:17 +0000 (11:24 -0400)
updateHostsFile.py

index eca6e83fae1db53fe60fa052305e592e73319a36..15de680e8361e7adf27c499c8ba7be98fef87cde 100644 (file)
@@ -292,7 +292,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'), 'w+')
+    finalFile = open(os.path.join(outputPath, 'hosts'), 'r+')
     mergeFile.seek(0) # reset file pointer
 
     hostnames = set()
git clone https://git.99rst.org/PROJECT