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")
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]:
import sys
import re
import pprint
-import types
import getopt
import glob
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]:
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:
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)