summaryrefslogtreecommitdiffstats
path: root/pym/cache
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-02-26 21:36:41 +0000
committerZac Medico <zmedico@gentoo.org>2006-02-26 21:36:41 +0000
commitdbda44a95299e0c089c4f7f721db32c74eac1ae6 (patch)
treec2d31612c2368c35ea7883d7bcf22d7741bcb9da /pym/cache
parent8edf2787fca77df7e17e25267f0e18d81667bedd (diff)
downloadportage-dbda44a95299e0c089c4f7f721db32c74eac1ae6.tar.gz
portage-dbda44a95299e0c089c4f7f721db32c74eac1ae6.tar.bz2
portage-dbda44a95299e0c089c4f7f721db32c74eac1ae6.zip
Use rstrip("\n") instead of -1 index to safely remove newline characters.
svn path=/main/trunk/; revision=2793
Diffstat (limited to 'pym/cache')
-rw-r--r--pym/cache/metadata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/cache/metadata.py b/pym/cache/metadata.py
index 0fd11cda8..99a7ad6db 100644
--- a/pym/cache/metadata.py
+++ b/pym/cache/metadata.py
@@ -50,7 +50,7 @@ class database(flat_hash.database):
if not c.isalpha():
if c == "=" and idx > 0:
hashed = True
- d[line[:idx]] = line[idx + 1:-1]
+ d[line[:idx]] = line[idx + 1:].rstrip("\n")
elif c == "_" or c.isdigit():
continue
break