From: fuzzyray Date: Mon, 18 Feb 2008 23:48:00 +0000 (-0000) Subject: Fix equery list to not generate an internal portage error when fed input with too... X-Git-Tag: gentoolkit-0.2.4.3~43 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0902b0b355ff95fe550d2231c71f9af7f7d9c09a;p=gentoolkit.git Fix equery list to not generate an internal portage error when fed input with too many slashes. (Bug 119806) svn path=/; revision=470 --- diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery index 84e3dae..a8be5e3 100755 --- a/trunk/src/equery/equery +++ b/trunk/src/equery/equery @@ -1325,7 +1325,13 @@ class CmdListPackages(Command): cat = "" if query != "": - (cat, name, ver, rev) = gentoolkit.split_package_name(query) + try: (cat, name, ver, rev) = gentoolkit.split_package_name(query) + except ValueError, e: + if str(e) == 'too many values to unpack': + print_error("A pattern to match against package names was expected, ") + warn_msg = "but %s has too many slashes ('/') to match any package." + die (1, warn_msg % query) + else: raise ValueError(e) if rev == "r0": rev = "" package_finder = None