TARGET_HOST is now targetIP.
authorSteven Black <redacted>
Mon, 15 Feb 2016 21:16:42 +0000 (16:16 -0500)
committerSteven Black <redacted>
Mon, 15 Feb 2016 21:16:42 +0000 (16:16 -0500)
updateHostsFile.py

index ddba54316b9cd2aa85716edf12dd0e41c6044fe0..12ade7ec84b05910c6bffc30f4401e596caa7b1d 100644 (file)
@@ -81,7 +81,6 @@ UPDATE_URL_FILENAME = 'update.info'
 SOURCES             = listdir_nohidden(DATA_PATH)
 README_TEMPLATE     = os.path.join(BASEDIR_PATH, 'readme_template.md')
 README_FILE         = os.path.join(BASEDIR_PATH, 'readme.md')
-TARGET_HOST         = '0.0.0.0'
 WHITELIST_FILE      = os.path.join(BASEDIR_PATH, 'whitelist')
 
 # Exclusions
@@ -93,9 +92,9 @@ COMMON_EXCLUSIONS = ['hulu.com']
 # Global vars
 exclusionRegexs = []
 numberOfRules   = 0
-
 auto = False
 verbose = True
+targetIP = '0.0.0.0'
 
 def main():
     parser = argparse.ArgumentParser(description="Creates an amalgamated hosts file from hosts stored in data subfolders.")
@@ -287,9 +286,9 @@ def normalizeRule(rule):
         hostname = hostname.lower().strip() # explicitly lowercase and trim the hostname
         if suffix is not '':
             # add suffix as comment only, not as a separate host
-            return hostname, "%s %s #%s\n" % (TARGET_HOST, hostname, suffix)
+            return hostname, "%s %s #%s\n" % (targetIP, hostname, suffix)
         else:
-            return hostname, "%s %s\n" % (TARGET_HOST, hostname)
+            return hostname, "%s %s\n" % (targetIP, hostname)
     print ("==>%s<==" % rule)
     return None, None
 
git clone https://git.99rst.org/PROJECT