Strip newlines from each line in make.conf.

This prevents us from having double newlines.

Change-Id: I9e9f9e9164872419bf263b15d2a7d048e98a0098

BUG=chromium-os:4843
TEST=Ran unit tests.

Review URL: http://codereview.chromium.org/4179002
This commit is contained in:
David James 2010-10-27 11:39:11 -07:00
parent 54f3b0bbd6
commit 0a4d1665fd

View File

@ -89,8 +89,11 @@ def UpdateLocalFile(filename, value, key='PORTAGE_BINHOST'):
file_lines = []
found = False
for line in file_fh:
# Strip newlines from end of line. We already add newlines below.
line = line.rstrip("\n")
if '=' not in line:
# Skip any line without an equal in it and just write it out
# Skip any line without an equal in it and just write it out.
file_lines.append(line)
continue