From: Zac Medico Date: Mon, 29 Oct 2007 05:26:59 +0000 (-0000) Subject: Use rstrip("\n") to remove trailing newlines from X-Git-Tag: v2.2_pre1~485 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=832a8feeae557e3a0643954cb29c000c407b10e6;p=portage.git Use rstrip("\n") to remove trailing newlines from CONTENTS lines. svn path=/main/trunk/; revision=8338 --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 6c10b7866..bfa052f6e 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -970,8 +970,7 @@ class dblink(object): "file, line %d: '%s'\n" % (pos, contents_file), noiselevel=-1) continue - if line.endswith("\n"): - line = line[:-1] + line = line.rstrip("\n") # Split on " " so that even file paths that # end with spaces can be handled. mydat = line.split(" ")