From 832a8feeae557e3a0643954cb29c000c407b10e6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 29 Oct 2007 05:26:59 +0000 Subject: [PATCH] Use rstrip("\n") to remove trailing newlines from CONTENTS lines. svn path=/main/trunk/; revision=8338 --- pym/portage/dbapi/vartree.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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(" ") -- 2.26.2