diff options
author | Alec Warner <antarus@gentoo.org> | 2007-07-22 09:55:50 +0000 |
---|---|---|
committer | Alec Warner <antarus@gentoo.org> | 2007-07-22 09:55:50 +0000 |
commit | 6f4ce3e8fa339a435e80798d9ce1cac4a2a0c83f (patch) | |
tree | c2ec7b5d5c2717a7458f9189c1b11761cc5d98c1 /pym/portage/output.py | |
parent | b143afc2a5b8e4ababd6ab9ce57d5a69d24dc12d (diff) | |
download | portage-6f4ce3e8fa339a435e80798d9ce1cac4a2a0c83f.tar.gz portage-6f4ce3e8fa339a435e80798d9ce1cac4a2a0c83f.tar.bz2 portage-6f4ce3e8fa339a435e80798d9ce1cac4a2a0c83f.zip |
Run pychecker over everything, fix obvious thing slike modules not in use, variables not being used, or global exceptions not being deleted. Also fix imports for style (1 per line)
svn path=/main/trunk/; revision=7354
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); |