summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-04 23:35:30 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-04 23:35:30 +0000
commit179aa621bec4e231aae4426e29b56973e0a17f42 (patch)
tree2f49513cdd59a08dba2eb0076a3b072930d4b3e0
parent5283c251bc28c14e56288e2d2b76d05661e2b7f9 (diff)
downloadportage-179aa621bec4e231aae4426e29b56973e0a17f42.tar.gz
portage-179aa621bec4e231aae4426e29b56973e0a17f42.tar.bz2
portage-179aa621bec4e231aae4426e29b56973e0a17f42.zip
Fix broken code concatenation logic in parse_color_map().
svn path=/main/trunk/; revision=7148
-rw-r--r--pym/portage/output.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/output.py b/pym/portage/output.py
index e0f675c8d..85a8756d9 100644
--- a/pym/portage/output.py
+++ b/pym/portage/output.py
@@ -201,9 +201,10 @@ def parse_color_map(onerror=None):
if ansi_code_pattern.match(v):
codes[k] = esc_seq + v
else:
+ code_list = []
for x in v.split(" "):
if x in codes:
- codes[k] = codes[k] + codes[x]
+ code_list.append(codes[x])
else:
e = ParseError("%s%s'%s'" % (
s.error_leader(myfile, s.lineno),
@@ -212,6 +213,7 @@ def parse_color_map(onerror=None):
onerror(e)
else:
raise e
+ codes[k] = "".join(code_list)
except (IOError, OSError), e:
if e.errno == errno.ENOENT:
raise FileNotFound(myfile)