diff options
Diffstat (limited to 'trunk/src')
| -rw-r--r-- | trunk/src/gentoolkit/helpers.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/trunk/src/gentoolkit/helpers.py b/trunk/src/gentoolkit/helpers.py index 6dba7db..bf2b1b1 100644 --- a/trunk/src/gentoolkit/helpers.py +++ b/trunk/src/gentoolkit/helpers.py @@ -10,6 +10,7 @@ import portage from gentoolkit import * from package import * +from pprinter import print_warn try: from portage.util import unique_array except ImportError: @@ -37,6 +38,9 @@ def find_packages(search_key, masked=False): 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() @@ -54,6 +58,9 @@ def find_installed_packages(search_key, masked=False): 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): |
