From: Steven Black Date: Mon, 15 Feb 2016 17:36:38 +0000 (-0500) Subject: Issue #77: fix - replace tabs with space. X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=a4b254d1cf36d22ed8287ba3410df37730babcae;p=stevenblack-hosts.git Issue #77: fix - replace tabs with space. --- diff --git a/updateHostsFile.py b/updateHostsFile.py index 358eda58c..308f4704b 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