diff options
author | 2007-04-01 05:03:35 +0000 | |
---|---|---|
committer | 2007-04-01 05:03:35 +0000 | |
commit | b268435e0b35ece1c8c1b3d91c8371bf2ee8980b (patch) | |
tree | 5b06d9c9e5d1b62f712d304bf615708f6080c5cb | |
parent | remove string module (diff) | |
download | gentoolkit-b268435e0b35ece1c8c1b3d91c8371bf2ee8980b.tar.gz gentoolkit-b268435e0b35ece1c8c1b3d91c8371bf2ee8980b.tar.bz2 gentoolkit-b268435e0b35ece1c8c1b3d91c8371bf2ee8980b.zip |
remove outdated usage of 'types'
svn path=/; revision=380
-rwxr-xr-x | trunk/src/equery/equery | 3 | ||||
-rwxr-xr-x | trunk/src/etcat/etcat | 3 | ||||
-rw-r--r-- | trunk/src/gentoolkit/helpers.py | 4 |
3 files changed, 4 insertions, 6 deletions
diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery index 8fec9fe..72bef59 100755 --- a/trunk/src/equery/equery +++ b/trunk/src/equery/equery @@ -17,7 +17,6 @@ import os import re import sys import time -import types # portage (output module) and gentoolkit need special path modifications sys.path.insert(0, "/usr/lib/portage/pym") @@ -1770,7 +1769,7 @@ if __name__ == "__main__": print_error(str(e)) sys.exit(2) except ValueError, e: - if e and type(e[0]) == types.ListType: + if isinstance(e[0], list): print_error("Ambiguous package name " + pp.emph("\"" + local_opts[0] + "\"")) print_error("Please use one of the following long names:") for p in e[0]: diff --git a/trunk/src/etcat/etcat b/trunk/src/etcat/etcat index 3b4aa8e..3ffa35d 100755 --- a/trunk/src/etcat/etcat +++ b/trunk/src/etcat/etcat @@ -84,7 +84,6 @@ import os import sys import re import pprint -import types import getopt import glob @@ -664,7 +663,7 @@ def main(): print red("!!!"), e sys.exit(2) except ValueError, e: - if type(e[0]) == types.ListType: + if isinstance(e[0],list): print red("!!!"), "Ambiguous package name \"%s\"" % query print red("!!!"), "Please use one of the following long names:" for p in e[0]: diff --git a/trunk/src/gentoolkit/helpers.py b/trunk/src/gentoolkit/helpers.py index fb22207..7220a7d 100644 --- a/trunk/src/gentoolkit/helpers.py +++ b/trunk/src/gentoolkit/helpers.py @@ -23,7 +23,7 @@ def find_packages(search_key, masked=False): t += portage.db["/"]["vartree"].dbapi.match(search_key) # catch the "amgigous package" Exception except ValueError, e: - if type(e[0]) == types.ListType: + if isinstance(e[0],list): t = [] for cp in e[0]: if masked: @@ -45,7 +45,7 @@ def find_installed_packages(search_key, masked=False): t = portage.db["/"]["vartree"].dbapi.match(search_key) # catch the "amgigous package" Exception except ValueError, e: - if type(e[0]) == types.ListType: + if isinstance(e[0],list): t = [] for cp in e[0]: t += portage.db["/"]["vartree"].dbapi.match(cp) |