‘hostsFile’ is a better variable name here than ‘dataFile’.
authorSteven Black <redacted>
Sun, 18 Dec 2016 23:34:41 +0000 (18:34 -0500)
committerSteven Black <redacted>
Sun, 18 Dec 2016 23:34:41 +0000 (18:34 -0500)
updateHostsFile.py

index 87e312279c50ee97a01ef5da0e751876a1b56a60..295bced98c90b2ca6b35f667f35c1495e9218e1a 100644 (file)
@@ -259,9 +259,9 @@ def updateAllSources():
             updatedFile = updatedFile.replace("\r", "") #get rid of carriage-return symbols
 
             # This is cross-python code
-            dataFile = open(os.path.join(BASEDIR_PATH, os.path.dirname(source), settings["hostfilename"]), "wb")
-            writeData(dataFile, updatedFile)
-            dataFile.close()
+            hostsFile = open(os.path.join(BASEDIR_PATH, os.path.dirname(source), settings["hostfilename"]), "wb")
+            writeData(hostsFile, updatedFile)
+            hostsFile.close()
         except:
             print ("Skipping.")
 # End Update Logic
git clone https://git.99rst.org/PROJECT