Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1201)

Unified Diff: prebuilt.py

Issue 4179002: Strip newlines from each line in make.conf. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: prebuilt.py
diff --git a/prebuilt.py b/prebuilt.py
index 1d5acacd462c86aee08f0463b9c6a2a051b32e8e..904ee74a840460d7dca07c8ce62d25e11b9482d2 100755
--- a/prebuilt.py
+++ b/prebuilt.py
@@ -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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698