diff --git a/updateHostsFile.py b/updateHostsFile.py index 820ead7f5..39e591f2e 100644 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -80,6 +80,7 @@ EXTENSIONS_PATH = os.path.join(BASEDIR_PATH, 'extensions') DATA_FILENAMES = 'hosts' UPDATE_URL_FILENAME = 'update.info' SOURCES = listdir_nohidden(DATA_PATH) +EXTENSIONS = listdir_nohidden(EXTENSIONS_PATH) README_TEMPLATE = os.path.join(BASEDIR_PATH, 'readme_template.md') README_FILE = os.path.join(BASEDIR_PATH, 'readme.md') WHITELIST_FILE = os.path.join(BASEDIR_PATH, 'whitelist') @@ -202,7 +203,8 @@ def matchesExclusions(strippedRule): # Update Logic def updateAllSources(): - for source in SOURCES: + allsources = list(set(SOURCES) | set(EXTENSIONS)) + for source in allsources: updateURL = getUpdateURLFromFile(source) if updateURL is None: continue @@ -240,6 +242,11 @@ def createInitialFile(): #Done in a cross-python way writeData(mergeFile, curFile.read()) + for source in extensions: + curFile = open(os.path.join(EXTENSIONS_PATH, source, DATA_FILENAMES), 'r') + #Done in a cross-python way + writeData(mergeFile, curFile.read()) + return mergeFile def removeDupsAndExcl(mergeFile):