From: Zac Medico Date: Wed, 4 Jul 2007 23:35:30 +0000 (-0000) Subject: Fix broken code concatenation logic in parse_color_map(). X-Git-Tag: v2.2_pre1~1085 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=179aa621bec4e231aae4426e29b56973e0a17f42;p=portage.git Fix broken code concatenation logic in parse_color_map(). svn path=/main/trunk/; revision=7148 --- 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)