From 45fa325d4249f73d18a62809d0441796a24c6f61 Mon Sep 17 00:00:00 2001 From: FrancoGag Date: Wed, 4 Nov 2015 11:47:55 -0300 Subject: [PATCH] Delete .DS_Store from Data If the Data folder is opened in OSX it creates a .DS_Store file and the python script tries to use it a source and returns errors, deleting it solves this issue. --- updateHostsFile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/updateHostsFile.py b/updateHostsFile.py index c73113e3a..b0a5df0d6 100755 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -73,6 +73,9 @@ SOURCES = os.listdir(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' +DS_STORE = BASEDIR_PATH + '/data/.DS_Store' +if os.path.isfile(DS_STORE): + os.remove(DS_STORE) # Exclusions EXCLUSION_PATTERN = '([a-zA-Z\d-]+\.){0,}' #append domain the end