From 4e8464a3a7c6eb1f46f54df7582ff4bad49495bd Mon Sep 17 00:00:00 2001 From: Steven Black Date: Mon, 15 Feb 2016 12:36:38 -0500 Subject: [PATCH] Issue #77: fix - replace tabs with space. Former-commit-id: a4b254d1cf36d22ed8287ba3410df37730babcae Former-commit-id: bdfb4930fcf0ecad00d9f002aab03b73f67f2d84 --- updateHostsFile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/updateHostsFile.py b/updateHostsFile.py index 358eda58cbe..308f4704bbd 100644 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -251,6 +251,8 @@ def removeDupsAndExcl(mergeFile): write = 'true' # Explicit encoding line = line.decode("UTF-8") + # replace tabs with space + line = line.replace('\t+', ' ') # Testing the first character doesn't require startswith if line[0] == '#' or re.match(r'^\s*$', line[0]): # Cross-python write