mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-04 19:46:02 +02:00
Issue #77: fix bug with emitting comments.
This commit is contained in:
parent
be64c93a22
commit
30e5d843d4
|
@ -320,9 +320,7 @@ def removeDupsAndExcl(mergeFile):
|
|||
# replace tabs with space
|
||||
line = line.replace('\t+', ' ')
|
||||
# Trim trailing whitespace
|
||||
line = line.rstrip()
|
||||
if not line:
|
||||
continue
|
||||
line = line.rstrip() + "\n"
|
||||
# Testing the first character doesn't require startswith
|
||||
if line[0] == '#' or re.match(r'^\s*$', line[0]):
|
||||
# Cross-python write
|
||||
|
|
Loading…
Reference in New Issue
Block a user