Fix broken code concatenation logic in parse_color_map().
authorZac Medico <zmedico@gentoo.org>
Wed, 4 Jul 2007 23:35:30 +0000 (23:35 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 4 Jul 2007 23:35:30 +0000 (23:35 -0000)
svn path=/main/trunk/; revision=7148

pym/portage/output.py

index e0f675c8d045b97c3401cf323cf90f92186f16b1..85a8756d9356c5f499139477fdeef736515172d2 100644 (file)
@@ -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)