Issue #77: fix bug with emitting comments.
authorSteven Black <redacted>
Fri, 25 Mar 2016 03:34:28 +0000 (23:34 -0400)
committerSteven Black <redacted>
Fri, 25 Mar 2016 03:34:28 +0000 (23:34 -0400)
updateHostsFile.py

index a6133cf616f0e6efb9ce69cbb7c60f958d6be190..20432e09fa4dd82677b23cc148d654c7fa555bec 100644 (file)
@@ -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
git clone https://git.99rst.org/PROJECT