diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-07-12 20:45:53 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-07-12 20:45:53 +0000 |
commit | c54a920d60415f19b3a42796193d87b6b21c84a1 (patch) | |
tree | fde9fd7ed67c42f3792badbb362415b24d4893fd /pym/portage/output.py | |
parent | 6c13644725a2371993fcf1d484e8852122a8b21e (diff) | |
download | portage-c54a920d60415f19b3a42796193d87b6b21c84a1.tar.gz portage-c54a920d60415f19b3a42796193d87b6b21c84a1.tar.bz2 portage-c54a920d60415f19b3a42796193d87b6b21c84a1.zip |
Remove leading slash from appropriate paths inside portage.const, so that
lstrip(os.sep) is not needed for os.path.join() calls. Thanks to Fabian
Groffen <grobian@g.o> for this patch.
svn path=/main/trunk/; revision=13821
Diffstat (limited to 'pym/portage/output.py')
-rw-r--r-- | pym/portage/output.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/portage/output.py b/pym/portage/output.py index ee792280a..4c533c427 100644 --- a/pym/portage/output.py +++ b/pym/portage/output.py @@ -150,7 +150,13 @@ def _parse_color_map(onerror=None): @rtype: dict @return: a dictionary mapping color classes to color codes """ - myfile = COLOR_MAP_FILE + # FIXME: use config_root iso / (breaks Prefix) + # We can use ObjectProxy to implement lazy initialization of + # codes and _styles, and add an init(config_root="/") function + # that can be called in order adjust the location that color.map + # is read from. + global codes, _styles + myfile = os.path.join('/', COLOR_MAP_FILE) ansi_code_pattern = re.compile("^[0-9;]*m$") quotes = '\'"' def strip_quotes(token): |