From: Zac Medico Date: Sun, 26 Feb 2006 21:36:41 +0000 (-0000) Subject: Use rstrip("\n") instead of -1 index to safely remove newline characters. X-Git-Tag: v2.1_pre6~47 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dbda44a95299e0c089c4f7f721db32c74eac1ae6;p=portage.git Use rstrip("\n") instead of -1 index to safely remove newline characters. svn path=/main/trunk/; revision=2793 --- 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