From 3cb281b082bbd686ab66830ea87151e09a1c3622 Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Sat, 31 Mar 2007 22:39:20 +0000 Subject: Fix traceback in equery which (Bug #134053) svn path=/; revision=369 --- trunk/src/equery/equery | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'trunk/src') diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery index bd3e715..8fec9fe 100755 --- a/trunk/src/equery/equery +++ b/trunk/src/equery/equery @@ -1027,7 +1027,12 @@ class CmdWhich(Command): matches = gentoolkit.sort_package_list(matches) if matches: - print_info(0, os.path.normpath(matches[-1].get_ebuild_path())) + pkg = matches[-1] + ebuild_path = pkg.get_ebuild_path() + if ebuild_path: + print_info(0, os.path.normpath(ebuild_path)) + else: + print_warn("There are no ebuilds to satisfy %s" % pkg.get_name()) else: print_error("No masked or unmasked packages found for " + pp.pkgquery(query)) -- cgit v1.2.3