summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-29 05:26:59 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-29 05:26:59 +0000
commit832a8feeae557e3a0643954cb29c000c407b10e6 (patch)
tree802fb1ce7f50229c4a7726d71f635db507368c12
parent1486f1b6e33d7b29d39660fdd873fac796944430 (diff)
downloadportage-832a8feeae557e3a0643954cb29c000c407b10e6.tar.gz
portage-832a8feeae557e3a0643954cb29c000c407b10e6.tar.bz2
portage-832a8feeae557e3a0643954cb29c000c407b10e6.zip
Use rstrip("\n") to remove trailing newlines from
CONTENTS lines. svn path=/main/trunk/; revision=8338
-rw-r--r--pym/portage/dbapi/vartree.py3
1 files changed, 1 insertions, 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(" ")