+2008-08-22: Paul Varner <fuzzyray@gentoo.org>
+ * gentoolkit: Fix find_packages and find_installed_packages to print
+ a warning instead of a traceback when an InvalidAtom exception occurs.
+ (Bug #234358)
+
2008-08-22: Paul Varner <fuzzyray@gentoo.org>
* equery: Fix equery belongs to strip multiple slashes from path
names. (Bug #234584)
import portage
from gentoolkit import *
from package import *
+from pprinter import print_warn
try:
from portage.util import unique_array
except ImportError:
t += portage.db["/"]["vartree"].dbapi.match(cp)
else:
raise ValueError(e)
+ except portage_exception.InvalidAtom, e:
+ print_warn("Invalid Atom: '%s'" % str(e))
+ return []
# Make the list of packages unique
t = unique_array(t)
t.sort()
t += portage.db["/"]["vartree"].dbapi.match(cp)
else:
raise ValueError(e)
+ except portage_exception.InvalidAtom, e:
+ print_warn("Invalid Atom: '%s'" % str(e))
+ return []
return [Package(x) for x in t]
def find_best_match(search_key):