diff options
Diffstat (limited to 'pym/portage/output.py')
-rw-r--r-- | pym/portage/output.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pym/portage/output.py b/pym/portage/output.py index 9f0b7950b..f4e90fb8e 100644 --- a/pym/portage/output.py +++ b/pym/portage/output.py @@ -4,7 +4,12 @@ __docformat__ = "epytext" -import commands, errno, os, re, shlex, sys, time +import commands +import errno +import os +import re +import shlex +import sys from portage.const import COLOR_MAP_FILE from portage.util import writemsg from portage.exception import PortageException, ParseError, PermissionDenied, FileNotFound @@ -170,7 +175,6 @@ def parse_color_map(onerror=None): try: s = shlex.shlex(open(myfile)) s.wordchars = s.wordchars + ";" # for ansi codes - d = {} while True: k, o, v = s.get_token(), s.get_token(), s.get_token() if k is s.eof: @@ -220,10 +224,11 @@ def parse_color_map(onerror=None): try: parse_color_map(onerror=lambda e: writemsg("%s\n" % str(e), noiselevel=-1)) -except FileNotFound, e: +except FileNotFound: pass except PortageException, e: writemsg("%s\n" % str(e)) + del e def nc_len(mystr): tmp = re.sub(esc_seq + "^m]+m", "", mystr); |