mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 15:11:19 +02:00
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:
parent
54f3b0bbd6
commit
0a4d1665fd
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user